digestpp  0.01
Experimental C++11 header-only message digest library.
Public Member Functions | List of all members
digestpp::mixin::blake_mixin< T > Class Template Reference

Defines additional public functions for BLAKE algorithm. More...

#include <blake_mixin.hpp>

Public Member Functions

hasher< T, mixin::blake_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::blake_mixin > & set_salt (const C *salt, size_t salt_len)
 Set salt from raw buffer. More...
 

Detailed Description

template<typename T>
class digestpp::mixin::blake_mixin< T >

Defines additional public functions for BLAKE algorithm.

See also
hasher, blake

Member Function Documentation

◆ set_salt() [1/2]

template<typename T >
hasher<T, mixin::blake_mixin>& digestpp::mixin::blake_mixin< T >::set_salt ( const std::string &  salt)
inline

Set salt from std::string.

Supported salt size is 16 bytes for BLAKE-224, BLAKE-256 and 32 bytes for BLAKE-384, BLAKE-512.

Parameters
[in]saltString with salt
Exceptions
std::runtime_errorif 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>
hasher<T, mixin::blake_mixin>& digestpp::mixin::blake_mixin< T >::set_salt ( const C *  salt,
size_t  salt_len 
)
inline

Set salt from raw buffer.

Supported salt size is 16 bytes for BLAKE-224, BLAKE-256 and 32 bytes for BLAKE-384, BLAKE-512.

Parameters
[in]saltPointer to salt bytes
[in]salt_lenSalt length (in bytes)
Exceptions
std::runtime_errorif salt size is not supported.
Returns
Reference to hasher

The documentation for this class was generated from the following file: