|
CXI
|
Encapsulates key handles or key blobs of type 'Backup Blob', see Format of Key Blobs. More...
Public Types | |
| enum | types { TYPE_UNKNOWN = 0 , TYPE_HANDLE , TYPE_BLOB , TYPE_UNKNOWN = 0 , TYPE_HANDLE , TYPE_BLOB } |
| enum | types { TYPE_UNKNOWN = 0 , TYPE_HANDLE , TYPE_BLOB , TYPE_UNKNOWN = 0 , TYPE_HANDLE , TYPE_BLOB } |
Public Member Functions | |
| Key (void) | |
| Key (const ByteArray &b) | |
| Key (const char *data, int len) | |
| int | getType () const |
| ByteArray | getUName () const |
| PropertyList | getProplist () const |
| ByteArray | getPublicKey () const |
Public Member Functions inherited from ByteArray | |
| ByteArray (void) | |
| ByteArray (int len) | |
| ByteArray (const char *data, int len) | |
| ByteArray (const char *str) | |
| ByteArray (int val, int len) | |
| ByteArray (const ByteArray &ba) | |
| virtual | ~ByteArray (void) |
| void | clear (void) |
| int | length (void) const |
| char * | get (void) |
| const char * | get (void) const |
| void | set (const char *data, int len) |
| void | append (const char *data, int len) |
| void | append (const ByteArray &ba) |
| void | insert (const char *data, int len, int offset) |
| void | fill (char value, int len, int offset) |
| int | getInt (int def_val=0) const |
| void | setInt (int val, int len) |
| void | appendInt (int val, int len) |
| void | getString (char *str, int max_size) const |
| void | setString (const char *str) |
| void | appendString (const char *str) |
| std::string | toString (void) const |
| std::string | toHexString (void) const |
| int | compare (const ByteArray &ba) const |
| ByteArray | sub (int offset, int len=-1) const |
| ByteArray | lstrip (void) const |
| ByteArray | rstrip (const std::set< char > &charsToBeStripped) const |
| void | read (const char *filename) |
| void | write (const char *filename) const |
| void | xtrace (const char *text=0) const |
| ByteArray & | operator= (const ByteArray &ba) |
| const ByteArray & | operator+= (const ByteArray &ba) |
| const ByteArray & | operator|= (const ByteArray &ba) |
| const ByteArray & | operator^= (const ByteArray &ba) |
| char & | operator[] (int idx) |
Encapsulates key handles or key blobs of type 'Backup Blob', see Format of Key Blobs.
A key can either contain a handle to a key that is stored on the CryptoServer (internal storage) or a key blob of type 'Backup Blob' that contains the attributes and components of the key (external storage).
A key blob contains the attributes and components of the key, see Format of Key Blobs. The key components are encrypted with the CryptoServers Master Backup Key (MBK). Additionally a key blob is protected against manipulation with a check value, which is a MAC over all key blob items, calculated with a MBK derived key.
| enum types |
Key Types
| enum types |
Key Types
| Key | ( | void | ) |
Default Constructor: creates empty key
| Key | ( | const char * | data, |
| int | len | ||
| ) |
Overloaded Constructor: creates a new key from given data
| int getType | ( | void | ) | const |
Returns the key type.
| cxi::Exception | in case of a malformed key blob |
| ByteArray getUName | ( | void | ) | const |
Returns the unique key name.
| cxi::Exception | in case of a malformed key blob |
| PropertyList getProplist | ( | void | ) | const |
Returns the property list of this key.
| cxi::Exception | if key doesn't contain a key blob or if its structure is invalid |
| ByteArray getPublicKey | ( | void | ) | const |
Returns the public key value of this key.
| cxi::Exception | if key doesn't contain a key blob or if its structure is invalid |