Defines additional public functions for BLAKE2 family of algorithms.
More...
#include <blake2_mixin.hpp>
|
hasher< T, mixin::blake2_mixin > & | set_salt (const std::string &salt) |
| Set salt from std::string. More...
|
|
template<typename C , typename std::enable_if< detail::is_byte< C >::value >::type * = nullptr> |
hasher< T, mixin::blake2_mixin > & | set_salt (const C *salt, size_t salt_len) |
| Set salt from raw buffer. More...
|
|
hasher< T, mixin::blake2_mixin > & | set_personalization (const std::string &personalization) |
| Set personalization from std::string. More...
|
|
template<typename C , typename std::enable_if< detail::is_byte< C >::value >::type * = nullptr> |
hasher< T, mixin::blake2_mixin > & | set_personalization (const C *personalization, size_t personalization_len) |
| Set personalization from raw buffer. More...
|
|
hasher< T, mixin::blake2_mixin > & | set_key (const std::string &key) |
| Set key from std::string. More...
|
|
template<typename C , typename std::enable_if< detail::is_byte< C >::value >::type * = nullptr> |
hasher< T, mixin::blake2_mixin > & | set_key (const C *key, size_t key_len) |
| Set key from raw buffer. More...
|
|
template<typename T>
class digestpp::mixin::blake2_mixin< T >
Defines additional public functions for BLAKE2 family of algorithms.
- See also
- hasher, blake2s, blake2b, blake2sx, blake2bx, blake2sx_xof, blake2bx_xof
◆ set_key() [1/2]
Set key from std::string.
Maximum key size is 32 bytes for BLAKE2s and 64 bytes for BLAKE2b.
- Parameters
-
- Exceptions
-
std::runtime_error | if key size is not supported. |
- Returns
- Reference to hasher
◆ set_key() [2/2]
template<typename T >
template<typename C , typename std::enable_if< detail::is_byte< C >::value >::type * = nullptr>
Set key from raw buffer.
Maximum key size is 32 bytes for BLAKE2s and 64 bytes for BLAKE2b.
- Parameters
-
[in] | key | Pointer to key bytes |
[in] | key_len | Key length (in bytes) |
- Exceptions
-
std::runtime_error | if key size is not supported. |
- Returns
- Reference to hasher
◆ set_personalization() [1/2]
Set personalization from std::string.
Supported personalization size is 8 bytes for BLAKE2s and 16 bytes for BLAKE2b.
- Parameters
-
[in] | personalization | String with personalization |
- Exceptions
-
std::runtime_error | if personalization size is not supported. |
- Returns
- Reference to hasher
◆ set_personalization() [2/2]
template<typename T >
template<typename C , typename std::enable_if< detail::is_byte< C >::value >::type * = nullptr>
Set personalization from raw buffer.
Supported personalization size is 8 bytes for BLAKE2s and 16 bytes for BLAKE2b.
- Parameters
-
[in] | personalization | Pointer to personalization bytes |
[in] | personalization_len | Personalization length (in bytes) |
- Exceptions
-
std::runtime_error | if personalization size is not supported. |
- Returns
- Reference to hasher
◆ set_salt() [1/2]
Set salt from std::string.
Supported salt size is 8 bytes for BLAKE2s and 16 bytes for BLAKE2b.
- Parameters
-
- Exceptions
-
std::runtime_error | if salt size is not supported. |
- Returns
- Reference to hasher
◆ set_salt() [2/2]
template<typename T >
template<typename C , typename std::enable_if< detail::is_byte< C >::value >::type * = nullptr>
Set salt from raw buffer.
Supported salt size is 8 bytes for BLAKE2s and 16 bytes for BLAKE2b.
- Parameters
-
[in] | salt | Pointer to salt bytes |
[in] | salt_len | Salt length (in bytes) |
- Exceptions
-
std::runtime_error | if salt size is not supported. |
- Returns
- Reference to hasher
The documentation for this class was generated from the following file: