cryptlib
3.4.1
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Macros
mechs
mech_int.h
Go to the documentation of this file.
1
/****************************************************************************
2
* *
3
* Internal Mechanism Header File *
4
* Copyright Peter Gutmann 1992-2008 *
5
* *
6
****************************************************************************/
7
8
#ifndef _MECH_INT_DEFINED
9
10
#define _MECH_INT_DEFINED
11
12
#ifndef _DEVMECH_DEFINED
13
#if defined( INC_ALL )
14
#include "
dev_mech.h
"
15
#else
16
#include "
mechs/dev_mech.h
"
17
#endif
/* Compiler-specific includes */
18
#endif
/* _DEVMECH_DEFINED */
19
20
/* Prototypes for functions in mech_int.c */
21
22
CHECK_RETVAL
STDC_NONNULL_ARG
( ( 3 ) ) \
23
int getPkcAlgoParams(
IN_HANDLE
const
CRYPT_CONTEXT
pkcContext,
24
OUT_OPT_ALGO_Z
CRYPT_ALGO_TYPE
*
pkcAlgo
,
25
OUT_LENGTH_PKC_Z
int
*
pkcKeySize
);
26
CHECK_RETVAL
STDC_NONNULL_ARG
( ( 2 ) ) \
27
int getHashAlgoParams(
IN_HANDLE
const
CRYPT_CONTEXT
hashContext
,
28
OUT_ALGO_Z
CRYPT_ALGO_TYPE
*
hashAlgo
,
29
OUT_OPT_LENGTH_HASH_Z
int
*
hashSize
);
30
CHECK_RETVAL
STDC_NONNULL_ARG
( ( 1, 3 ) ) \
31
int adjustPKCS1Data(
OUT_BUFFER_FIXED
( outDataMaxLen )
BYTE
*outData,
32
IN_LENGTH_SHORT_MIN
(
CRYPT_MAX_PKCSIZE
) \
33
const
int
outDataMaxLen,
34
IN_BUFFER
(
inLen
)
const
BYTE
*inData,
35
IN_LENGTH_SHORT
const
int
inLen
,
36
IN_LENGTH_SHORT
const
int
keySize
);
37
38
/* Prototypes for kernel-internal access functions. This is a bit of an odd
39
place to have them but we need to have a prototype visible to both the
40
mechanism code where they're called and the kernel code */
41
42
CHECK_RETVAL
STDC_NONNULL_ARG
( ( 2, 4 ) ) \
43
int extractKeyData(
IN_HANDLE
const
CRYPT_CONTEXT
iCryptContext
,
44
OUT_BUFFER_FIXED
(
keyDataLen
)
void
*
keyData
,
45
IN_LENGTH_SHORT_MIN
(
MIN_KEYSIZE
)
const
int
keyDataLen
,
46
IN_BUFFER
( accessKeyLen )
const
char
*accessKey,
47
IN_LENGTH_FIXED
( 7 )
const
int
accessKeyLen );
48
#ifdef _STREAM_DEFINED
49
CHECK_RETVAL
STDC_NONNULL_ARG
( ( 1 ) ) \
50
int importPrivateKeyData(
INOUT
STREAM
*
stream
,
51
IN_HANDLE
const
CRYPT_CONTEXT
iCryptContext,
52
IN_ENUM
( KEYFORMAT ) \
53
const
KEYFORMAT_TYPE
formatType
);
54
CHECK_RETVAL
STDC_NONNULL_ARG
( ( 1, 4 ) ) \
55
int exportPrivateKeyData(
INOUT
STREAM
*stream,
56
IN_HANDLE
const
CRYPT_CONTEXT
iCryptContext,
57
IN_ENUM
( KEYFORMAT ) \
58
const
KEYFORMAT_TYPE
formatType
,
59
IN_BUFFER
( accessKeyLen )
const
char
*accessKey,
60
IN_LENGTH_FIXED
( 11 )
const
int
accessKeyLen );
61
#endif
/* _STREAM_DEFINED */
62
63
#endif
/* _MECH_INT_DEFINED */
Generated on Thu Jan 10 2013 10:00:50 for cryptlib by
1.8.2