Cryptographic hashing.
Namespaces | |
namespace | weak |
Broken cryptographic hashes, must not be used except for compatibility. | |
Enumerations | |
enum class | OutputEncoding { kBinary , kBase16 , kHex = kBase16 , kBase64 } |
enum class | Pad { kWith , kWithout } |
Functions | |
std::string | Blake2b128 (std::string_view data, OutputEncoding encoding=OutputEncoding::kHex) |
Calculates Blake2-128, output format depends from encoding param. | |
std::string | Sha1 (std::string_view data, OutputEncoding encoding=OutputEncoding::kHex) |
Calculates SHA-1, output format depends from encoding param. | |
std::string | Sha224 (std::string_view data, OutputEncoding encoding=OutputEncoding::kHex) |
Calculates SHA-224, output format depends from encoding param. | |
std::string | Sha256 (std::string_view data, OutputEncoding encoding=OutputEncoding::kHex) |
Calculates SHA-256, output format depends from encoding param. | |
std::string | Sha384 (std::string_view data, OutputEncoding encoding=OutputEncoding::kHex) |
Calculates SHA-384, output format depends from encoding param. | |
std::string | Sha512 (std::string_view data, OutputEncoding encoding=OutputEncoding::kHex) |
Calculates SHA-512, output format depends from encoding param. | |
std::string | HmacSha1 (std::string_view key, std::string_view message, OutputEncoding encoding=OutputEncoding::kHex) |
Calculates HMAC (using SHA-1 hash), encodes result with encoding algorithm. | |
std::string | HmacSha256 (std::string_view key, std::string_view message, OutputEncoding encoding=OutputEncoding::kHex) |
Calculates HMAC (using SHA-256 hash), encodes result with encoding algorithm. | |
std::string | HmacSha384 (std::string_view key, std::string_view message, OutputEncoding encoding=OutputEncoding::kHex) |
Calculates HMAC (using SHA-384 hash), encodes result with encoding algorithm. | |
std::string | HmacSha512 (std::string_view key, std::string_view message, OutputEncoding encoding=OutputEncoding::kHex) |
Calculates HMAC (using SHA-512 hash), encodes result with encoding algorithm. | |
std::string crypto::hash::Blake2b128 | ( | std::string_view | data, |
OutputEncoding | encoding = OutputEncoding::kHex ) |
Calculates Blake2-128, output format depends from encoding param.
encoding | result could be returned as binary string or encoded |
CryptoException | internal library exception |
std::string crypto::hash::HmacSha1 | ( | std::string_view | key, |
std::string_view | message, | ||
OutputEncoding | encoding = OutputEncoding::kHex ) |
Calculates HMAC (using SHA-1 hash), encodes result with encoding
algorithm.
key | HMAC key |
message | data to encode |
encoding | result could be returned as binary string or encoded |
CryptoException | internal library exception |
std::string crypto::hash::HmacSha256 | ( | std::string_view | key, |
std::string_view | message, | ||
OutputEncoding | encoding = OutputEncoding::kHex ) |
Calculates HMAC (using SHA-256 hash), encodes result with encoding
algorithm.
key | HMAC key |
message | data to encode |
encoding | result could be returned as binary string or encoded |
CryptoException | internal library exception |
std::string crypto::hash::HmacSha384 | ( | std::string_view | key, |
std::string_view | message, | ||
OutputEncoding | encoding = OutputEncoding::kHex ) |
Calculates HMAC (using SHA-384 hash), encodes result with encoding
algorithm.
key | HMAC key |
message | data to encode |
encoding | result could be returned as binary string or encoded |
CryptoException | internal library exception |
std::string crypto::hash::HmacSha512 | ( | std::string_view | key, |
std::string_view | message, | ||
OutputEncoding | encoding = OutputEncoding::kHex ) |
Calculates HMAC (using SHA-512 hash), encodes result with encoding
algorithm.
key | HMAC key |
message | data to encode |
encoding | result could be returned as binary string or encoded |
CryptoException | internal library exception |
std::string crypto::hash::Sha1 | ( | std::string_view | data, |
OutputEncoding | encoding = OutputEncoding::kHex ) |
Calculates SHA-1, output format depends from encoding param.
encoding | result could be returned as binary string or encoded |
CryptoException | internal library exception |
std::string crypto::hash::Sha224 | ( | std::string_view | data, |
OutputEncoding | encoding = OutputEncoding::kHex ) |
Calculates SHA-224, output format depends from encoding param.
encoding | result could be returned as binary string or encoded |
CryptoException | internal library exception |
std::string crypto::hash::Sha256 | ( | std::string_view | data, |
OutputEncoding | encoding = OutputEncoding::kHex ) |
Calculates SHA-256, output format depends from encoding param.
encoding | result could be returned as binary string or encoded |
CryptoException | internal library exception |
std::string crypto::hash::Sha384 | ( | std::string_view | data, |
OutputEncoding | encoding = OutputEncoding::kHex ) |
Calculates SHA-384, output format depends from encoding param.
encoding | result could be returned as binary string or encoded |
CryptoException | internal library exception |
std::string crypto::hash::Sha512 | ( | std::string_view | data, |
OutputEncoding | encoding = OutputEncoding::kHex ) |
Calculates SHA-512, output format depends from encoding param.
encoding | result could be returned as binary string or encoded |
CryptoException | internal library exception |