PIByteArray operators & | ^
PIDigest add BLAKE2 algorithms and HMAC
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
#define pidigest_h
|
||||
|
||||
#include "pibytearray.h"
|
||||
#include "piconstchars.h"
|
||||
|
||||
class PIP_EXPORT PIDigest {
|
||||
public:
|
||||
@@ -47,10 +48,25 @@ public:
|
||||
MD2,
|
||||
MD4,
|
||||
MD5,
|
||||
BLAKE2s_128,
|
||||
BLAKE2s_160,
|
||||
BLAKE2s_224,
|
||||
BLAKE2s_256,
|
||||
BLAKE2b_128,
|
||||
BLAKE2b_160,
|
||||
BLAKE2b_224,
|
||||
BLAKE2b_256,
|
||||
BLAKE2b_384,
|
||||
BLAKE2b_512,
|
||||
Count,
|
||||
};
|
||||
|
||||
static int length(Type type);
|
||||
static int hashLength(Type type);
|
||||
static int blockLength(Type type);
|
||||
static PIConstChars typeName(Type type);
|
||||
|
||||
static PIByteArray calculate(const PIByteArray & msg, Type type);
|
||||
static PIByteArray HMAC(const PIByteArray & msg, const PIByteArray & key, PIDigest::Type type);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user