CryptoKey Class Reference Cryptography

#include <cryptography_key.h>

Inheritance diagram for CryptoKey:

详细描述

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()

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()

MAXON_DEFAULT_REFERENCE_CONSTRUCTORS ( CryptoKey   ,
Reference   
)

◆  EmbedStreamName()

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.
返回
Returns a new Url which can be used as encrypted io stream.

◆  CreateInterface()

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  
)
static private