37 #ifndef VIRGIL_CRYPTO_VIRGIL_CUSTOM_PARAMS_H
38 #define VIRGIL_CRYPTO_VIRGIL_CUSTOM_PARAMS_H
43 #include <virgil/crypto/VirgilByteArray.h>
44 #include <virgil/crypto/foundation/asn1/VirgilAsn1Compatible.h>
46 namespace virgil {
namespace crypto {
76 size_t childWrittenBytes = 0)
const;
98 void setInteger(
const VirgilByteArray& key,
int value);
104 int getInteger(
const VirgilByteArray& key)
const;
115 void setString(
const VirgilByteArray& key,
const VirgilByteArray& value);
121 VirgilByteArray
getString(
const VirgilByteArray& key)
const;
132 void setData(
const VirgilByteArray& key,
const VirgilByteArray& value);
138 VirgilByteArray
getData(
const VirgilByteArray& key)
const;
157 std::map<VirgilByteArray, int> intValues_;
158 std::map<VirgilByteArray, VirgilByteArray> stringValues_;
159 std::map<VirgilByteArray, VirgilByteArray> dataValues_;
Data object that represent ASN.1 structure: VirgilCustomParams.
Definition: VirgilCustomParams.h:51
This class provides methods for reading ASN.1 data structure.
Definition: VirgilAsn1Reader.h:53
VirgilByteArray getData(const VirgilByteArray &key) const
Get parameter with type: Data.
void removeData(const VirgilByteArray &key)
Remove parameter with type: Data.
This class provides interface that allow to save and restore object state in the ASN.1 structure.
Definition: VirgilAsn1Compatible.h:59
This class provides methods for writing ASN.1 data structure.
Definition: VirgilAsn1Writer.h:54
void setInteger(const VirgilByteArray &key, int value)
Set parameter with type: Integer.
Definition: VirgilAsn1Compatible.h:46
void setString(const VirgilByteArray &key, const VirgilByteArray &value)
Set parameter with type: String.
void clear()
Remove all parameters.
VirgilByteArray getString(const VirgilByteArray &key) const
Get parameter with type: String.
virtual size_t asn1Write(virgil::crypto::foundation::asn1::VirgilAsn1Writer &asn1Writer, size_t childWrittenBytes=0) const
Write object state to the writer.
int getInteger(const VirgilByteArray &key) const
Get parameter with type: Integer.
void setData(const VirgilByteArray &key, const VirgilByteArray &value)
Set parameter with type: Data.
void removeString(const VirgilByteArray &key)
Remove parameter with type: String.
void removeInteger(const VirgilByteArray &key)
Remove parameter with type: Integer.
bool isEmpty() const
Define whether no one parameter is set.
virtual ~VirgilCustomParams()
Polymorphic destructor.
virtual void asn1Read(virgil::crypto::foundation::asn1::VirgilAsn1Reader &asn1Reader)
Read object state from the reader.