ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

implglue.h
Go to the documentation of this file.
00001 /*
00002  * dlls/rsaenh/implglue.h
00003  * Glueing the RSAENH specific code to the crypto library
00004  *
00005  * Copyright (c) 2004 Michael Jung
00006  *
00007  * based on code by Mike McCormack and David Hammerton
00008  *
00009  * This library is free software; you can redistribute it and/or
00010  * modify it under the terms of the GNU Lesser General Public
00011  * License as published by the Free Software Foundation; either
00012  * version 2.1 of the License, or (at your option) any later version.
00013  *
00014  * This library is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00017  * Lesser General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU Lesser General Public
00020  * License along with this library; if not, write to the Free Software
00021  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
00022  */
00023 
00024 #ifndef __WINE_IMPLGLUE_H
00025 #define __WINE_IMPLGLUE_H
00026 
00027 #include "tomcrypt.h"
00028 #include "sha2.h"
00029 
00030 /* Next typedef copied from dlls/advapi32/crypt_md4.c */
00031 typedef struct tagMD4_CTX {
00032     unsigned int buf[4];
00033     unsigned int i[2];
00034     unsigned char in[64];
00035     unsigned char digest[16];
00036 } MD4_CTX;
00037 
00038 /* Next typedef copied from dlls/advapi32/crypt_md5.c */
00039 typedef struct tagMD5_CTX
00040 {
00041     unsigned int i[2];
00042     unsigned int buf[4];
00043     unsigned char in[64];
00044     unsigned char digest[16];
00045 } MD5_CTX;
00046 
00047 /* Next typedef copied form dlls/advapi32/crypt_sha.c */
00048 typedef struct tagSHA_CTX
00049 {
00050     ULONG Unknown[6];
00051     ULONG State[5];
00052     ULONG Count[2];
00053     UCHAR Buffer[64];
00054 } SHA_CTX, *PSHA_CTX;
00055 
00056 typedef union tagHASH_CONTEXT {
00057     md2_state md2;
00058     MD4_CTX md4;
00059     MD5_CTX md5;
00060     SHA_CTX sha;
00061     SHA256_CTX sha256;
00062     SHA384_CTX sha384;
00063     SHA512_CTX sha512;
00064 } HASH_CONTEXT;
00065 
00066 typedef union tagKEY_CONTEXT {
00067     rc2_key rc2;
00068     des_key des;
00069     des3_key des3;
00070     aes_key aes;
00071     prng_state rc4;
00072     rsa_key rsa;
00073 } KEY_CONTEXT;
00074 
00075 BOOL init_hash_impl(ALG_ID aiAlgid, HASH_CONTEXT *pHashContext) DECLSPEC_HIDDEN;
00076 BOOL update_hash_impl(ALG_ID aiAlgid, HASH_CONTEXT *pHashContext, CONST BYTE *pbData, 
00077                       DWORD dwDataLen) DECLSPEC_HIDDEN;
00078 BOOL finalize_hash_impl(ALG_ID aiAlgid, HASH_CONTEXT *pHashContext, BYTE *pbHashValue) DECLSPEC_HIDDEN;
00079 BOOL duplicate_hash_impl(ALG_ID aiAlgid, CONST HASH_CONTEXT *pSrcHashContext, 
00080                          HASH_CONTEXT *pDestHashContext) DECLSPEC_HIDDEN;
00081 
00082 BOOL new_key_impl(ALG_ID aiAlgid, KEY_CONTEXT *pKeyContext, DWORD dwKeyLen) DECLSPEC_HIDDEN;
00083 BOOL free_key_impl(ALG_ID aiAlgid, KEY_CONTEXT *pKeyContext) DECLSPEC_HIDDEN;
00084 BOOL setup_key_impl(ALG_ID aiAlgid, KEY_CONTEXT *pKeyContext, DWORD dwKeyLen,
00085                     DWORD dwEffectiveKeyLen, DWORD dwSaltLen, BYTE *abKeyValue) DECLSPEC_HIDDEN;
00086 BOOL duplicate_key_impl(ALG_ID aiAlgid, CONST KEY_CONTEXT *pSrcKeyContext, 
00087                         KEY_CONTEXT *pDestKeyContext) DECLSPEC_HIDDEN;
00088 
00089 /* dwKeySpec is optional for symmetric key algorithms */
00090 BOOL encrypt_block_impl(ALG_ID aiAlgid, DWORD dwKeySpec, KEY_CONTEXT *pKeyContext, CONST BYTE *pbIn, BYTE *pbOut, 
00091                         DWORD enc) DECLSPEC_HIDDEN;
00092 BOOL encrypt_stream_impl(ALG_ID aiAlgid, KEY_CONTEXT *pKeyContext, BYTE *pbInOut, DWORD dwLen) DECLSPEC_HIDDEN;
00093 
00094 BOOL export_public_key_impl(BYTE *pbDest, const KEY_CONTEXT *pKeyContext, DWORD dwKeyLen,
00095                             DWORD *pdwPubExp) DECLSPEC_HIDDEN;
00096 BOOL import_public_key_impl(CONST BYTE *pbSrc, KEY_CONTEXT *pKeyContext, DWORD dwKeyLen, 
00097                             DWORD dwPubExp) DECLSPEC_HIDDEN;
00098 BOOL export_private_key_impl(BYTE *pbDest, const KEY_CONTEXT *pKeyContext, DWORD dwKeyLen,
00099                              DWORD *pdwPubExp) DECLSPEC_HIDDEN;
00100 BOOL import_private_key_impl(CONST BYTE* pbSrc, KEY_CONTEXT *pKeyContext, DWORD dwKeyLen, 
00101                              DWORD dwDataLen, DWORD dwPubExp) DECLSPEC_HIDDEN;
00102 
00103 BOOL gen_rand_impl(BYTE *pbBuffer, DWORD dwLen) DECLSPEC_HIDDEN;
00104 
00105 #endif /* __WINE_IMPLGLUE_H */

Generated on Sat May 26 2012 04:24:43 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.