summaryrefslogtreecommitdiff
path: root/packages/moxiebox/sha.h
blob: 36b90a18e6c25c17475eddde885b6bf2ae9b4e3d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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