BeeCrypt
4.2.1
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
include
beecrypt
fips186.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 1998, 1999, 2000, 2001, 2002 X-Way Rights BV
3
*
4
* This library is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU Lesser General Public
6
* License as published by the Free Software Foundation; either
7
* version 2.1 of the License, or (at your option) any later version.
8
*
9
* This library is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
* Lesser General Public License for more details.
13
*
14
* You should have received a copy of the GNU Lesser General Public
15
* License along with this library; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
*
18
*/
19
26
#ifndef _FIPS186_H
27
#define _FIPS186_H
28
29
#include "
beecrypt/beecrypt.h
"
30
31
#ifdef _REENTRANT
32
# if WIN32
33
# include <windows.h>
34
# include <winbase.h>
35
# endif
36
#endif
37
38
#include "
beecrypt.h
"
39
#include "
sha1.h
"
40
41
#if (MP_WBITS == 64)
42
# define FIPS186_STATE_SIZE 8
43
#elif (MP_WBITS == 32)
44
# define FIPS186_STATE_SIZE 16
45
#else
46
# error
47
#endif
48
51
#ifdef __cplusplus
52
struct
BEECRYPTAPI
fips186Param
53
#else
54
struct _fips186Param
55
#endif
56
{
57
#ifdef _REENTRANT
58
bc_mutex_t
lock;
59
#endif
60
sha1Param
param
;
61
mpw
state[
FIPS186_STATE_SIZE
];
62
byte
digest[20];
63
unsigned
char
digestremain
;
64
};
65
66
#ifndef __cplusplus
67
typedef
struct
_fips186Param
fips186Param
;
68
#endif
69
70
#ifdef __cplusplus
71
extern
"C"
{
72
#endif
73
74
extern
BEECRYPTAPI
const
randomGenerator
fips186prng
;
75
76
BEECRYPTAPI
77
int
fips186Setup
(
fips186Param
*);
78
BEECRYPTAPI
79
int
fips186Seed
(
fips186Param
*,
const
byte
*,
size_t
);
80
BEECRYPTAPI
81
int
fips186Next
(
fips186Param
*,
byte
*,
size_t
);
82
BEECRYPTAPI
83
int
fips186Cleanup
(
fips186Param
*);
84
85
#ifdef __cplusplus
86
}
87
#endif
88
89
#endif
Generated by
1.8.3.1