cryptlib  3.4.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros
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 
23 int getPkcAlgoParams( IN_HANDLE const CRYPT_CONTEXT pkcContext,
27 int getHashAlgoParams( IN_HANDLE const CRYPT_CONTEXT hashContext,
30 CHECK_RETVAL STDC_NONNULL_ARG( ( 1, 3 ) ) \
31 int adjustPKCS1Data( OUT_BUFFER_FIXED( outDataMaxLen ) BYTE *outData,
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,
46  IN_BUFFER( accessKeyLen ) const char *accessKey,
47  IN_LENGTH_FIXED( 7 ) const int accessKeyLen );
48 #ifdef _STREAM_DEFINED
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 ) \
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 */