Virgil Security Crypto library  2.6.3
List of all members
virgil::crypto::VirgilCustomParams Class Reference

Data object that represent ASN.1 structure: VirgilCustomParams. More...

#include <VirgilCustomParams.h>

Inheritance diagram for virgil::crypto::VirgilCustomParams:
virgil::crypto::foundation::asn1::VirgilAsn1Compatible

Public Member Functions

VirgilAsn1Compatible implementation
Marshalling format:
VirgilCustomParams ::= SET SIZE (1..MAX) OF KeyValue
KeyValue ::= SEQUENCE {
key Key,
val Value
}
Key ::= UTF8String
Value ::= CHOICE {
int [0] EXPLICIT INTEGER,
str [1] EXPLICIT UTF8String,
data [2] EXPLICIT OCTET STRING
}
virtual size_t asn1Write (virgil::crypto::foundation::asn1::VirgilAsn1Writer &asn1Writer, size_t childWrittenBytes=0) const
 Write object state to the writer. More...
 
virtual void asn1Read (virgil::crypto::foundation::asn1::VirgilAsn1Reader &asn1Reader)
 Read object state from the reader. More...
 
Info
bool isEmpty () const
 Define whether no one parameter is set.
 
Manage Parameters
Note
Key duplication is allowed for different parameter types.
void setInteger (const VirgilByteArray &key, int value)
 Set parameter with type: Integer.
 
int getInteger (const VirgilByteArray &key) const
 Get parameter with type: Integer. More...
 
void removeInteger (const VirgilByteArray &key)
 Remove parameter with type: Integer. More...
 
void setString (const VirgilByteArray &key, const VirgilByteArray &value)
 Set parameter with type: String.
 
VirgilByteArray getString (const VirgilByteArray &key) const
 Get parameter with type: String. More...
 
void removeString (const VirgilByteArray &key)
 Remove parameter with type: String. More...
 
void setData (const VirgilByteArray &key, const VirgilByteArray &value)
 Set parameter with type: Data.
 
VirgilByteArray getData (const VirgilByteArray &key) const
 Get parameter with type: Data. More...
 
void removeData (const VirgilByteArray &key)
 Remove parameter with type: Data. More...
 
void clear ()
 Remove all parameters.
 
- Public Member Functions inherited from virgil::crypto::foundation::asn1::VirgilAsn1Compatible
virgil::crypto::VirgilByteArray toAsn1 () const
 Save object state to the ASN.1 structure.
 
void fromAsn1 (const virgil::crypto::VirgilByteArray &asn1)
 Restore object state from the ASN.1 structure.
 
virtual ~VirgilAsn1Compatible () noexcept
 Polymorphic destructor.
 

Additional Inherited Members

- Protected Member Functions inherited from virgil::crypto::foundation::asn1::VirgilAsn1Compatible
virtual void checkRequiredField (const VirgilByteArray &param) const
 If given parameter is empty exception will be thrown. More...
 

Detailed Description

Data object that represent ASN.1 structure: VirgilCustomParams.

Member Function Documentation

virtual void virgil::crypto::VirgilCustomParams::asn1Read ( virgil::crypto::foundation::asn1::VirgilAsn1Reader asn1Reader)
virtual

Read object state from the reader.

Parameters
asn1Readerreader payloaded with ASN.1 to be read.

Implements virgil::crypto::foundation::asn1::VirgilAsn1Compatible.

virtual size_t virgil::crypto::VirgilCustomParams::asn1Write ( virgil::crypto::foundation::asn1::VirgilAsn1Writer asn1Writer,
size_t  childWrittenBytes = 0 
) const
virtual

Write object state to the writer.

Parameters
asn1Writerwriter that should be payloaded by subclasses.
childWrittenBytescount of bytes that was written by subclasses.
Returns
Writen bytes count.

Implements virgil::crypto::foundation::asn1::VirgilAsn1Compatible.

VirgilByteArray virgil::crypto::VirgilCustomParams::getData ( const VirgilByteArray key) const

Get parameter with type: Data.

Exceptions
VirgilCryptoExceptionif given key is absent.
int virgil::crypto::VirgilCustomParams::getInteger ( const VirgilByteArray key) const

Get parameter with type: Integer.

Exceptions
VirgilCryptoExceptionif given key is absent.
VirgilByteArray virgil::crypto::VirgilCustomParams::getString ( const VirgilByteArray key) const

Get parameter with type: String.

Exceptions
VirgilCryptoExceptionif given key is absent.
void virgil::crypto::VirgilCustomParams::removeData ( const VirgilByteArray key)

Remove parameter with type: Data.

Note
Do nothing if given key is absent.
void virgil::crypto::VirgilCustomParams::removeInteger ( const VirgilByteArray key)

Remove parameter with type: Integer.

Note
Do nothing if given key is absent.
void virgil::crypto::VirgilCustomParams::removeString ( const VirgilByteArray key)

Remove parameter with type: String.

Note
Do nothing if given key is absent.

The documentation for this class was generated from the following file: