Namespaces |
|
maxon::StreamConversions | |
maxon::BLOWFISHLEGACYENDECODER_OPTIONS | |
maxon::HASH_HMAC | |
maxon::CryptographyOptions |
Classes |
|
class | CryptographyStreamConversionInterface |
class | CryptoKeyInterface |
class | CryptoKey |
Typedefs |
|
using | BLOCK_CIPHER_CTR_CALLBACK = Delegate < void( Int block, Int blockSize, UChar *nonce)> |
Enumerations |
|
enum |
BLOCK_CIPHER_MODE
: UInt64 {
ECB , CBC , PCBC , CFB , OFB , CTR , KEEP_STATE } |
函数 |
|
enum maxon::BLOCK_CIPHER_MODE UInt64 | MAXON_ENUM_FLAGS ( BLOCK_CIPHER_MODE ) |
Result < String > | GetHashString (const BaseArray < UChar > &hashValue) |
Result < String > | GetPasswordHash (const String &password, const StreamConversionFactory &hashClass, const DataDictionary &settings=DataDictionary()) |
Result < Tuple < String , String > > | HashPasswordWithSalt (const String &password, const StreamConversionFactory &hashClass=StreamConversions::HashSHA256()) |
Result < void > | AddConversionTestSetting ( MAXON_SOURCE_LOCATION_DECLARATION , BaseArray < DataDictionary > &resultArray, const Id &encoderId, const Id &decoderId, 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 (), const Char *srcData=nullptr, const Char *compareData=nullptr) |
using BLOCK_CIPHER_CTR_CALLBACK = Delegate <void( Int block, Int blockSize, UChar * nonce)> |
param[in] block The block number. param[in] blockSize The size in bytes. param[in] userData User data that was originally passed to the Encrypt and Decrypt function. param[out] nonce A buffer that is filled with the Nonce data. You may only write blockSize bytes.
|
strong |
Block cipher modes. See documentation of the encryption method for details.
enum maxon::BLOCK_CIPHER_MODE UInt64 maxon::MAXON_ENUM_FLAGS | ( | BLOCK_CIPHER_MODE | ) |
Result < String > maxon::GetHashString | ( | const BaseArray < UChar > & | hashValue | ) |
Returns the hash value as a hexadecimal string. The length of the value depends on the algorithm.
[in] | hashValue | The input (byte) values. |
Result < String > maxon::GetPasswordHash | ( | const String & | password , |
const StreamConversionFactory & | hashClass , | ||
const DataDictionary & |
settings
=
DataDictionary()
|
||
) |
Returns the hash value string of a password.
[in] | password | The input password. |
[in] | hashClass | The algorithm to use, e.g. StreamConversions::HashMD5() |
[in] | settings | Settings for the hash algorithm which will be passed to the Init() function. |
Result < Tuple < String , String > > maxon::HashPasswordWithSalt | ( | const String & | password , |
const StreamConversionFactory & |
hashClass
=
StreamConversions::HashSHA256()
|
||
) |
HashPasswdWithSalt creates a unique salt string and hashes the password together with the string hash(salt + password). To verify a password you need to store the salt and call "String hashedPasswd = GetPasswordHash(passwordSalt + passwd, StreamConversions::HashSHA256())" to get the hashed passwd.
[in] | password | Password to hash. |
[in] | hashClass | HashClass to use. |
Result <void> maxon::AddConversionTestSetting | ( | MAXON_SOURCE_LOCATION_DECLARATION | , |
BaseArray < DataDictionary > & | resultArray , | ||
const Id & | encoderId , | ||
const Id & | decoderId , | ||
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()
,
|
||
const Char * |
srcData
=
nullptr
,
|
||
const Char * |
compareData
=
nullptr
|
||
) |
Helper function to add crypto tests.