MySQL 8.0.39
Source Code Documentation
|
message digest. More...
#include <digest.h>
Public Types | |
enum class | Type { Md5 , Sha1 , Sha224 , Sha256 , Sha384 , Sha512 } |
Public Member Functions | |
Digest (Type type) | |
constructor. More... | |
void | reinit () |
initialize or reinitialize the message digest functions. More... | |
void | update (const std::string &data) |
update Digest. More... | |
void | update (const std::vector< uint8_t > &data) |
update Digest. More... | |
void | finalize (std::vector< uint8_t > &out) |
finalize the digest and get digest value. More... | |
void | finalize (std::string &out) |
finalize the digest and get digest value. More... | |
Static Public Member Functions | |
static size_t | digest_size (Type type) |
get size of the digest value. More... | |
Private Member Functions | |
template<typename Container > | |
void | finalize_impl (Container &out) |
Static Private Member Functions | |
static const EVP_MD * | get_evp_md (Type type) noexcept |
Private Attributes | |
Type | type_ |
std::unique_ptr< EVP_MD_CTX, decltype(&EVP_MD_CTX_destroy)> | ctx_ |
message digest.
Wrapper around Digest functions of openssl (EVP_MD_...)
|
strong |
|
inline |
constructor.
initializes the digest function.
|
inlinestatic |
get size of the digest value.
type | type of message digest |
|
inline |
finalize the digest and get digest value.
out | string to place the digest value in |
|
inline |
finalize the digest and get digest value.
out | vector to place the digest value in |
|
inlineprivate |
|
inlinestaticprivatenoexcept |
|
inline |
initialize or reinitialize the message digest functions.
Allows reused of the Digest function without reallocating memory.
|
inline |
update Digest.
data | data to update digest function with |
|
inline |
update Digest.
data | data to update digest function with |
|
private |
|
private |