diff options
| author | J08nY | 2019-11-21 19:10:50 +0100 |
|---|---|---|
| committer | J08nY | 2019-11-21 19:10:50 +0100 |
| commit | c8d0bff46001bd5636825c5b0bb4c896cb34a4e6 (patch) | |
| tree | 2b3029c6ca37e56e86daa34069ab39da3b1a5400 /pyecsca/codegen/hash/hash.h | |
| download | pyecsca-codegen-c8d0bff46001bd5636825c5b0bb4c896cb34a4e6.tar.gz pyecsca-codegen-c8d0bff46001bd5636825c5b0bb4c896cb34a4e6.tar.zst pyecsca-codegen-c8d0bff46001bd5636825c5b0bb4c896cb34a4e6.zip | |
Initialize.
Diffstat (limited to 'pyecsca/codegen/hash/hash.h')
| -rw-r--r-- | pyecsca/codegen/hash/hash.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/pyecsca/codegen/hash/hash.h b/pyecsca/codegen/hash/hash.h new file mode 100644 index 0000000..9e79b61 --- /dev/null +++ b/pyecsca/codegen/hash/hash.h @@ -0,0 +1,21 @@ +#ifndef HASH_H_ +#define HASH_H_ + +#include <stdint.h> + +#define HASH_NONE 0 +#define HASH_SHA1 1 +#define HASH_SHA224 2 +#define HASH_SHA256 3 +#define HASH_SHA384 4 +#define HASH_SHA512 5 + +int hash_size(int input_size); + +void *hash_new_ctx(void); + +void hash_init(void *ctx); + +void hash_final(void *ctx, int size, const uint8_t *msg, uint8_t *digest); + +#endif //HASH_H_
\ No newline at end of file |
