-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsha3_224.hpp
27 lines (25 loc) · 1.75 KB
/
sha3_224.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
// http://en.wikipedia.org/wiki/SHA-3
// wrapper for SHA3_224 for module of GNU/Linux kernel written by Jeff Garzik <[email protected]> from https://lwn.net/Articles/518415/
// Alexey Potehin <[email protected]>, http://www.gnuplanet.ru/doc/cv
//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
#ifndef SHA3_224_HPP_INCLUDE
#define SHA3_224_HPP_INCLUDE
//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
#include <stdint.h>
#include "sha3.h"
//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
class sha3_224_t
{
public:
typedef uint8_t sha3_224_item_t[SHA3_224_DIGEST_SIZE];
sha3_224_t();
void open(sha3_224_item_t *psha3_224_item);
void update(const void * const p, uint64_t size);
void close();
private:
struct sha3_state ctx;
sha3_224_item_t *psha3_224_item;
};
//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
#endif