#include <cryptography_key.h>
Reference counted class of CryptoKeyInterface .
公共成员函数 |
|
MAXON_DEFAULT_REFERENCE_CONSTRUCTORS ( CryptoKey , Reference) | |
CryptoKey (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 ()) | |
Result < Url > | EmbedStreamName (const Url &unencryptedStream) |
Static Private Member Functions |
|
static CryptoKeyInterface * | CreateInterface (const Id &cryptoAlgorithm, Int blockSizeBits, const void *key1, Int key1BitSize, const void *key2, Int key2BitSize, UInt64 flags, BLOCK_CIPHER_CTR_CALLBACK &&callback) |
CryptoKey | ( | 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()
|
||
) |
Allocates the class.
[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. |
MAXON_DEFAULT_REFERENCE_CONSTRUCTORS | ( | CryptoKey | , |
Reference | |||
) |
Result < Url > EmbedStreamName | ( | const Url & | unencryptedStream | ) |
Returns a new Url where the given stream name is wrapped into a URLSCHEME_CRYPTOFILE with the given crypto key. This allows to do file en-/decryption on the fly when reading/writing streams.
[in] | unencryptedStream | The stream name of the unencrypted stream. |
|
static private |