Ordo  0.3.4
Symmetric Cryptography Library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
sha256.h
Go to the documentation of this file.
1 /*===-- primitives/hash_functions/sha256.h -------------*- PUBLIC -*- H -*-===*/
8 /*===----------------------------------------------------------------------===*/
9 
10 #ifndef ORDO_SHA256_H
11 #define ORDO_SHA256_H
12 
14 #include "ordo/common/interface.h"
18 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
23 /*===----------------------------------------------------------------------===*/
24 
25 #define sha256_init ordo_sha256_init
26 #define sha256_update ordo_sha256_update
27 #define sha256_final ordo_sha256_final
28 #define sha256_query ordo_sha256_query
29 #define sha256_bsize ordo_sha256_bsize
30 
31 /*===----------------------------------------------------------------------===*/
32 
37 ORDO_PUBLIC
38 int sha256_init(struct SHA256_STATE *state,
39  const void *params);
40 
43 ORDO_PUBLIC
44 void sha256_update(struct SHA256_STATE *state,
45  const void *buffer,
46  size_t len);
47 
50 ORDO_PUBLIC
51 void sha256_final(struct SHA256_STATE *state,
52  void *digest);
53 
56 ORDO_PUBLIC
57 size_t sha256_query(int query, size_t value);
58 
65 ORDO_PUBLIC
66 size_t sha256_bsize(void);
67 
68 /*===----------------------------------------------------------------------===*/
69 
70 #ifdef __cplusplus
71 }
72 #endif
73 
74 #endif
ORDO_PUBLIC int sha256_init(struct SHA256_STATE *state, const void *params)
Definition: sha256.c:35
Abstraction Layer.
ORDO_PUBLIC size_t sha256_query(int query, size_t value)
ORDO_PUBLIC size_t sha256_bsize(void)
ORDO_PUBLIC void sha256_update(struct SHA256_STATE *state, const void *buffer, size_t len)
Definition: sha256.c:52
ORDO_PUBLIC void sha256_final(struct SHA256_STATE *state, void *digest)
Definition: sha256.c:84