Monero
Loading...
Searching...
No Matches
skein.h
Go to the documentation of this file.
1#ifndef _SKEIN_H_
2#define _SKEIN_H_ 1
3/**************************************************************************
4**
5** Interface declarations and internal definitions for Skein hashing.
6**
7** Source code author: Doug Whiting, 2008.
8**
9** This algorithm and source code is released to the public domain.
10**
11***************************************************************************
12**
13** The following compile-time switches may be defined to control some
14** tradeoffs between speed, code size, error checking, and security.
15**
16** The "default" note explains what happens when the switch is not defined.
17**
18** SKEIN_DEBUG -- make callouts from inside Skein code
19** to examine/display intermediate values.
20** [default: no callouts (no overhead)]
21**
22** SKEIN_ERR_CHECK -- how error checking is handled inside Skein
23** code. If not defined, most error checking
24** is disabled (for performance). Otherwise,
25** the switch value is interpreted as:
26** 0: use assert() to flag errors
27** 1: return SKEIN_FAIL to flag errors
28**
29***************************************************************************/
30#include "skein_port.h" /* get platform-specific definitions */
31
32typedef enum
33{
34 SKEIN_SUCCESS = 0, /* return codes from Skein calls */
37}
39
40typedef size_t DataLength; /* bit count type */
41typedef u08b_t BitSequence; /* bit stream type */
42
43/* "all-in-one" call */
44HashReturn skein_hash(int hashbitlen, const BitSequence *data,
45 DataLength databitlen, BitSequence *hashval);
46
47#endif /* ifndef _SKEIN_H_ */
unsigned long long DataLength
Definition groestl.h:65
unsigned char BitSequence
Definition groestl.h:64
HashReturn
Definition jh.h:19
@ SKEIN_FAIL
Definition skein.h:35
@ SKEIN_BAD_HASHLEN
Definition skein.h:36
@ SKEIN_SUCCESS
Definition skein.h:34
HashReturn skein_hash(int hashbitlen, const BitSequence *data, DataLength databitlen, BitSequence *hashval)
Definition skein.c:2025
uint8_t u08b_t
Definition skein_port.h:88
std::string data
Definition base58.cpp:37