Crypto Namespace Reference

Classes

class  Blob
 Wraps a pointer to some data with size. More...
 
class  HashContext
 Class template for a Hash implementation 'Context'. More...
 
class  HmacContext
 

Typedefs

using Secret = Blob
 Identifies data which should be treated with care. More...
 
template<size_t size_>
using ByteArray = std::array< uint8_t, size_ >
 Class template for fixed byte array. More...
 
using Md5 = HashContext< Md5Engine >
 
using Sha1 = HashContext< Sha1Engine >
 
using Sha224 = HashContext< Sha224Engine >
 
using Sha256 = HashContext< Sha256Engine >
 
using Sha384 = HashContext< Sha384Engine >
 
using Sha512 = HashContext< Sha512Engine >
 
using HmacMd5 = HmacContext< Md5 >
 
using HmacSha1 = HmacContext< Sha1 >
 
using HmacSha224 = HmacContext< Sha224 >
 
using HmacSha256 = HmacContext< Sha256 >
 
using HmacSha384 = HmacContext< Sha384 >
 
using HmacSha512 = HmacContext< Sha512 >
 

Functions

template<size_t size_>
String toString (const ByteArray< size_ > &array, char separator='\0')
 
 CRYPTO_HASH_ENGINE (Md5, md5, MD5_SIZE, MD5_STATESIZE, MD5_BLOCKSIZE)
 
 CRYPTO_HASH_ENGINE (Sha1, sha1, SHA1_SIZE, SHA1_STATESIZE, SHA1_BLOCKSIZE)
 
 CRYPTO_HASH_ENGINE (Sha224, sha224, SHA224_SIZE, SHA224_STATESIZE, SHA224_BLOCKSIZE)
 
 CRYPTO_HASH_ENGINE (Sha256, sha256, SHA256_SIZE, SHA256_STATESIZE, SHA256_BLOCKSIZE)
 
 CRYPTO_HASH_ENGINE (Sha384, sha384, SHA384_SIZE, SHA384_STATESIZE, SHA384_BLOCKSIZE)
 
 CRYPTO_HASH_ENGINE (Sha512, sha512, SHA512_SIZE, SHA512_STATESIZE, SHA512_BLOCKSIZE)
 

Typedef Documentation

◆ ByteArray

template<size_t size_>
using Crypto::ByteArray = typedef std::array<uint8_t, size_>

Class template for fixed byte array.

Note
Until C++17 (and GCC > 5.5) inheriting from std::array<> breaks aggregate initialization.

◆ HmacMd5

using Crypto::HmacMd5 = typedef HmacContext<Md5>

◆ HmacSha1

using Crypto::HmacSha1 = typedef HmacContext<Sha1>

◆ HmacSha224

◆ HmacSha256

◆ HmacSha384

◆ HmacSha512

◆ Md5

using Crypto::Md5 = typedef HashContext<Md5Engine>

◆ Secret

using Crypto::Secret = typedef Blob

Identifies data which should be treated with care.

◆ Sha1

using Crypto::Sha1 = typedef HashContext<Sha1Engine>

◆ Sha224

using Crypto::Sha224 = typedef HashContext<Sha224Engine>

◆ Sha256

using Crypto::Sha256 = typedef HashContext<Sha256Engine>

◆ Sha384

using Crypto::Sha384 = typedef HashContext<Sha384Engine>

◆ Sha512

using Crypto::Sha512 = typedef HashContext<Sha512Engine>

Function Documentation

◆ CRYPTO_HASH_ENGINE() [1/6]

Crypto::CRYPTO_HASH_ENGINE ( Md5  ,
md5  ,
MD5_SIZE  ,
MD5_STATESIZE  ,
MD5_BLOCKSIZE   
)

◆ CRYPTO_HASH_ENGINE() [2/6]

Crypto::CRYPTO_HASH_ENGINE ( Sha1  ,
sha1  ,
SHA1_SIZE  ,
SHA1_STATESIZE  ,
SHA1_BLOCKSIZE   
)

◆ CRYPTO_HASH_ENGINE() [3/6]

Crypto::CRYPTO_HASH_ENGINE ( Sha224  ,
sha224  ,
SHA224_SIZE  ,
SHA224_STATESIZE  ,
SHA224_BLOCKSIZE   
)

◆ CRYPTO_HASH_ENGINE() [4/6]

Crypto::CRYPTO_HASH_ENGINE ( Sha256  ,
sha256  ,
SHA256_SIZE  ,
SHA256_STATESIZE  ,
SHA256_BLOCKSIZE   
)

◆ CRYPTO_HASH_ENGINE() [5/6]

Crypto::CRYPTO_HASH_ENGINE ( Sha384  ,
sha384  ,
SHA384_SIZE  ,
SHA384_STATESIZE  ,
SHA384_BLOCKSIZE   
)

◆ CRYPTO_HASH_ENGINE() [6/6]

Crypto::CRYPTO_HASH_ENGINE ( Sha512  ,
sha512  ,
SHA512_SIZE  ,
SHA512_STATESIZE  ,
SHA512_BLOCKSIZE   
)

◆ toString()

template<size_t size_>
String Crypto::toString ( const ByteArray< size_ > &  array,
char  separator = '\0' 
)