CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
asymmetric_algorithm.h
1
2#pragma once
3
4#include <defines.h>
5#include <system/string.h>
6#include <system/shared_ptr.h>
7#include <system/object.h>
8#include <system/array.h>
9#include <system/idisposable.h>
10#include <security/cryptography/key_sizes.h>
11
12namespace System { namespace Security { namespace Cryptography {
13
18class ASPOSECPP_SHARED_CLASS ABSTRACT AsymmetricAlgorithm : virtual public Object, public IDisposable
19{
25 ASPOSECPP_SHARED_RTTI_INFO_DECL();
26
27public:
30 virtual ASPOSECPP_SHARED_API int32_t get_KeySize();
33 virtual ASPOSECPP_SHARED_API void set_KeySize(int32_t value);
36 virtual ASPOSECPP_SHARED_API ArrayPtr<SharedPtr<KeySizes> > get_LegalKeySizes();
37
39 ASPOSECPP_SHARED_API void Clear();
40
43 virtual ASPOSECPP_SHARED_API void FromXmlString(String xmlString);
46 virtual ASPOSECPP_SHARED_API String ToXmlString(bool include_private_parameters);
49 virtual ASPOSECPP_SHARED_API String get_SignatureAlgorithm();
52 virtual ASPOSECPP_SHARED_API String get_KeyExchangeAlgorithm();
53
55 ASPOSECPP_SHARED_API void Dispose() override;
56
59 static ASPOSECPP_SHARED_API SharedPtr<AsymmetricAlgorithm> Create();
63 static ASPOSECPP_SHARED_API SharedPtr<AsymmetricAlgorithm> Create(const String& alg_name);
64
65protected:
67 ASPOSECPP_SHARED_API AsymmetricAlgorithm();
68
70 int32_t KeySizeValue;
73};
74
75}}} // namespace System::Security::Cryptography
Defines method that releases resources owned by the current object. Objects of this class should only...
Definition: idisposable.h:30
Base class that enables using methods available for System.Object class in C#. All non-trivial classe...
Definition: object.h:62
Abstract base class for asymmetric encryption algorithms. Objects of this class should only be alloca...
Definition: asymmetric_algorithm.h:19
virtual void set_KeySize(int32_t value)
Sets key size.
virtual void FromXmlString(String xmlString)
Reads algorithm parameters from XML string.
static SharedPtr< AsymmetricAlgorithm > Create()
Creates a default algorithm. Not implemented.
int32_t KeySizeValue
Key size associated with algorithm.
Definition: asymmetric_algorithm.h:70
static SharedPtr< AsymmetricAlgorithm > Create(const String &alg_name)
Creates algorithm by name. Not implemented.
virtual String get_KeyExchangeAlgorithm()
Gets key exchange algorithm to use.
virtual int32_t get_KeySize()
Gets key size.
virtual ArrayPtr< SharedPtr< KeySizes > > get_LegalKeySizes()
Gets array of allowed key sizes.
virtual String get_SignatureAlgorithm()
Gets signature algorithm to use.
void Dispose() override
Releases resources owned by the current object.
ArrayPtr< SharedPtr< KeySizes > > LegalKeySizesValue
Enabled key sizes.
Definition: asymmetric_algorithm.h:72
virtual String ToXmlString(bool include_private_parameters)
Writes algorithm parameters to XML string.
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
String class used across the library. Is a substitute for C# System.String when translating code....
Definition: string.h:122
Definition: db_command.h:9