![]() |
PIP 5.6.1
Platform-Independent Primitives
|
One-shot digest API for supported algorithms. More...
#include <pidigest.h>
Public Types | |
| enum class | Type { SHA1 , SHA2_224 , SHA2_256 , SHA2_384 , SHA2_512 , SHA2_512_224 , SHA2_512_256 , MD2 , MD4 , MD5 , BLAKE2s_128 , BLAKE2s_160 , BLAKE2s_224 , BLAKE2s_256 , BLAKE2b_128 , BLAKE2b_160 , BLAKE2b_224 , BLAKE2b_256 , BLAKE2b_384 , BLAKE2b_512 , SipHash_2_4_64 , SipHash_2_4_128 , HalfSipHash_2_4_32 , HalfSipHash_2_4_64 , Count } |
| Supported digest algorithms. More... | |
Static Public Member Functions | |
| static int | hashLength (Type type) |
| Returns digest length in bytes for algorithm "type". | |
| static int | blockLength (Type type) |
| Returns internal block length in bytes for algorithm "type". | |
| static PIConstChars | typeName (Type type) |
| Returns stable algorithm name for "type". | |
| static PIByteArray | calculate (const PIByteArray &msg, Type type) |
| Calculates digest of message "msg" with algorithm "type". | |
| static PIByteArray | calculateWithKey (const PIByteArray &msg, const PIByteArray &key, Type type) |
| Calculates keyed digest for algorithms with native key support, otherwise returns empty array. | |
| static PIByteArray | HMAC (const PIByteArray &msg, const PIByteArray &key, PIDigest::Type type) |
| Calculates HMAC for message "msg" and key "key" with algorithm "type". | |
One-shot digest API for supported algorithms.
|
strong |
Supported digest algorithms.