CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
rsa_signature_padding.h
1
2#pragma once
3
4#include <system/iequatable.h>
5#include <security/cryptography/rsa_signature_padding_mode.h>
6#include <security/cryptography/hash_algorithm_name.h>
7
8namespace System { namespace Security { namespace Cryptography {
9
11class ASPOSECPP_SHARED_CLASS RSASignaturePadding final
12 : public IEquatable<SharedPtr<RSASignaturePadding>>
13{
17 typedef Object BaseType;
19 ASPOSECPP_SHARED_RTTI_INFO_DECL();
20
21public:
23 static ASPOSECPP_SHARED_API SharedPtr<RSASignaturePadding> get_Pkcs1();
24
26 static ASPOSECPP_SHARED_API SharedPtr<RSASignaturePadding> get_Pss();
27
30 {
31 return m_mode;
32 }
33
34 ASPOSECPP_SHARED_API int GetHashCode() const override;
35 ASPOSECPP_SHARED_API bool Equals(SharedPtr<Object> other) override;
36 ASPOSECPP_SHARED_API bool Equals(SharedPtr<RSASignaturePadding> other) override;
37 ASPOSECPP_SHARED_API String ToString() const override;
38
39private:
40 const RSASignaturePaddingMode m_mode;
41
43 : m_mode(mode)
44 {}
45 MEMBER_FUNCTION_MAKE_OBJECT(RSASignaturePadding, CODEPORTING_ARGS(RSASignaturePaddingMode mode), CODEPORTING_ARGS(mode));
46
47 ASPOSECPP_SHARED_API ~RSASignaturePadding();
48};
49
51{
52 if (left.get() == nullptr)
53 return right.get() == nullptr;
54
55 return left->Equals(right);
56}
57
59{
60 return !(left == right);
61}
62
63}}} // namespace System::Security::Cryptography
Defines a method that determines the equality of two objects. Objects of this class should only be al...
Definition: iequatable.h:16
Base class that enables using methods available for System.Object class in C#. All non-trivial classe...
Definition: object.h:62
Padding mode and parameters for RSA signature creation or verification operations.
Definition: rsa_signature_padding.h:13
int GetHashCode() const override
Analog of C# Object.GetHashCode() method. Enables hashing of custom objects.
String ToString() const override
Analog of C# Object.ToString() method. Enables converting custom objects to string.
bool Equals(SharedPtr< RSASignaturePadding > other) override
static SharedPtr< RSASignaturePadding > get_Pkcs1()
Gets PKCS #1 v1.5 mode.
RSASignaturePaddingMode get_Mode() const
Gets the padding mode.
Definition: rsa_signature_padding.h:29
bool Equals(SharedPtr< Object > other) override
static SharedPtr< RSASignaturePadding > get_Pss()
Gets PSS mode.
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
Pointee_ * get() const
Gets pointed object.
Definition: smart_ptr.h:518
String class used across the library. Is a substitute for C# System.String when translating code....
Definition: string.h:122
RSASignaturePaddingMode
Padding mode used with RSA signature creation or verification operations.
Definition: rsa_signature_padding_mode.h:10
constexpr bool operator==(std::nullptr_t, const HashAlgorithmName &)
Definition: hash_algorithm_name.h:124
constexpr bool operator!=(std::nullptr_t, const HashAlgorithmName &)
Definition: hash_algorithm_name.h:125
Definition: db_command.h:9