#include <cryptography_key.h>
Class to store all encryption parameters for a StreamConversionRef class. It's used to pass keys via Url to crypto file handlers.
Url aesfile( "crypto://[file:///h:/cpuinfo.txt.aes]" _s); aesfile.SetData(URL_CRYPTO_KEY,Data(CryptoKey(CryptographyClasses::AES.GetId(), 128, ( const void *) "<<SecretKey>>..." , 16 * 8))));@MAXON_ANNOTATION{refclass=false}
公共成员函数 |
|
const MAXON_METHOD Id & | GetCryptoAlgorithm () const |
MAXON_METHOD Int | GetBlockBitSize () const |
const MAXON_METHOD void * | GetKey1 () const |
MAXON_METHOD Int | GetKey1BitSize () const |
const MAXON_METHOD void * | GetKey2 () const |
MAXON_METHOD Int | GetKey2BitSize () const |
MAXON_METHOD UInt64 | GetFlags () const |
const MAXON_METHOD BLOCK_CIPHER_CTR_CALLBACK & | GetCallbackFunction () const |
MAXON_METHOD String | ToString (const FormatStatement *formatStatement=nullptr) const |
静态公共成员函数 |
|
static MAXON_METHOD CryptoKeyInterface * | Alloc ( MAXON_SOURCE_LOCATION_DECLARATION , const Id &cryptoAlgorithm, Int blockSizeBits, const void *key1, Int key1BitSize, const void *key2=nullptr, Int key2BitSize=0, UInt64 flags=0, BLOCK_CIPHER_CTR_CALLBACK &&callback= BLOCK_CIPHER_CTR_CALLBACK ()) |
私有成员函数 |
|
MAXON_INTERFACE_NONVIRTUAL ( CryptoKeyInterface , MAXON_REFERENCE_CONST , "net.maxon.interface.cryptokey") |
|
private |
|
static |
Allocates the class.
[in] | allocLocation | Pass MAXON_SOURCE_LOCATION(_NAME) to add the current source line and file. |
[in] | cryptoAlgorithm | Id of an encryption algorithm. e.g. CryptographyClasses::AES.GetId(). |
[in] | blockSizeBits | Blocksize of the algorithm in bits. |
[in] | key1 | Pointer to the data of key 1. |
[in] | key1BitSize | Size of the key 1 in bits. |
[in] | key2 | Pointer to the data of key 2. |
[in] | key2BitSize | Size of the key 2 in bits. |
[in] | flags | Additional flags. |
[in] | callback | Callback function for CTR mode. Please consult the documentation of the cryptography algorithm for an explanation. |
const MAXON_METHOD Id & GetCryptoAlgorithm | ( | ) | const |
Returns the cryptography algorithm.
MAXON_METHOD Int GetBlockBitSize | ( | ) | const |
Returns the cryptography block size in bits.
const MAXON_METHOD void* GetKey1 | ( | ) | const |
Returns the cryptography data of key 1.
MAXON_METHOD Int GetKey1BitSize | ( | ) | const |
Returns the cryptography size of key 1.
const MAXON_METHOD void* GetKey2 | ( | ) | const |
Returns the cryptography data of key 2.
MAXON_METHOD Int GetKey2BitSize | ( | ) | const |
Returns the cryptography size of key 2.
MAXON_METHOD UInt64 GetFlags | ( | ) | const |
Returns the additional flags.
const MAXON_METHOD BLOCK_CIPHER_CTR_CALLBACK & GetCallbackFunction | ( | ) | const |
Returns the callback delegate.
MAXON_METHOD String ToString | ( | const FormatStatement * |
formatStatement
=
nullptr
|
) | const |