Electroneum
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
32
typedef
enum
33
{
34
SKEIN_SUCCESS
= 0,
/* return codes from Skein calls */
35
SKEIN_FAIL
= 1,
36
SKEIN_BAD_HASHLEN
= 2
37
}
38
HashReturn
;
39
40
typedef
size_t
DataLength
;
/* bit count type */
41
typedef
u08b_t
BitSequence
;
/* bit stream type */
42
43
/* "all-in-one" call */
44
HashReturn
skein_hash
(
int
hashbitlen,
const
BitSequence
*data,
45
DataLength
databitlen,
BitSequence
*hashval);
46
47
#endif
/* ifndef _SKEIN_H_ */
BitSequence
u08b_t BitSequence
Definition:
skein.h:41
SKEIN_BAD_HASHLEN
Definition:
skein.h:36
SKEIN_FAIL
Definition:
skein.h:35
u08b_t
uint8_t u08b_t
Definition:
skein_port.h:89
HashReturn
HashReturn
Definition:
skein.h:32
BitSequence
unsigned char BitSequence
Definition:
groestl.h:65
SKEIN_SUCCESS
Definition:
skein.h:34
DataLength
size_t DataLength
Definition:
skein.h:40
skein_port.h
HashReturn
HashReturn
Definition:
jh.h:19
DataLength
unsigned long long DataLength
Definition:
groestl.h:66
skein_hash
HashReturn skein_hash(int hashbitlen, const BitSequence *data, DataLength databitlen, BitSequence *hashval)
src
crypto
skein.h
Generated on Sun Mar 10 2024 12:00:00 for Electroneum by
1.8.14