diff options
author | Alexey Neyman <stilor@att.net> | 2018-12-01 21:00:50 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-01 21:00:50 (GMT) |
commit | dc681ec8eb53eccdd18521853abaf0574d6ae75f (patch) | |
tree | 67532a4e3a2498ab5663bb400649ec847ced6ba7 /packages/moxiebox/sha.h | |
parent | 951afda5088f202eead14e3ae281f234b160af0b (diff) | |
parent | 40d5bf64408a0e103f8149f941ea50fbbb11dc91 (diff) |
Merge pull request #1102 from stilor/moxie
Moxie architecture support
Diffstat (limited to 'packages/moxiebox/sha.h')
-rw-r--r-- | packages/moxiebox/sha.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/packages/moxiebox/sha.h b/packages/moxiebox/sha.h new file mode 100644 index 0000000..36b90a1 --- /dev/null +++ b/packages/moxiebox/sha.h @@ -0,0 +1,23 @@ +/* + Wrapper around moxiebox'es implementation of SHA256 digest that + mimics the API of the OpenSSL implementation. +*/ + +#ifndef __SHA_H_ +#define __SHA_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include "../runtime/sandboxrt_crypto.h" +#define SHA256_DIGEST_LENGTH SHA256_BLOCK_SIZE +void SHA256_Init(SHA256_CTX *ctx); +void SHA256_Update(SHA256_CTX *ctx, const void *data, size_t len); +void SHA256_Final(unsigned char *md, SHA256_CTX *ctx); + +#ifdef __cplusplus +} +#endif + +#endif |