#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()) |
| |
| | CryptoKey (const Id &cryptoAlgorithm, Int blockSizeBits, const Block< const Byte > &key1, const Block< const Byte > &key2=GetZeroRef< Block< const Byte >>(), UInt64 flags=0, BLOCK_CIPHER_CTR_CALLBACK &&callback=BLOCK_CIPHER_CTR_CALLBACK()) |
| |
| Result< Url > | EmbedStreamName (const Url &unencryptedStream) const |
| |
◆ CryptoKey() [1/2]
Allocates a new CryptoKey.
- Parameters
-
| [in] | cryptoAlgorithm | Id of an encryption algorithm. e.g. StreamConversions::AesEncoder.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. |
◆ CryptoKey() [2/2]
Allocates a new CryptoKey.
- Parameters
-
| [in] | cryptoAlgorithm | Id of an encryption algorithm. e.g. StreamConversions::AesEncoder.GetId(). |
| [in] | blockSizeBits | Blocksize of the algorithm in bits. |
| [in] | key1 | The bytes of key 1. |
| [in] | key2 | The bytes of key 2. |
| [in] | flags | Additional flags. |
| [in] | callback | Callback function for CTR mode. |
◆ MAXON_DEFAULT_REFERENCE_CONSTRUCTORS()
| MAXON_DEFAULT_REFERENCE_CONSTRUCTORS |
( |
CryptoKey |
, |
|
|
Reference |
|
|
) |
| |
◆ EmbedStreamName()
| Result<Url> EmbedStreamName |
( |
const Url & |
unencryptedStream | ) |
const |
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.
- Parameters
-
| [in] | unencryptedStream | The stream name of the unencrypted stream. |
- Returns
- Returns a new Url which can be used as encrypted io stream.