Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

OW32::CCryptHash Class Reference

CryptoAPI hash wrapper. More...

#include <CryptHash.h>

List of all members.

Public Member Functions

 CCryptHash ()
 Constructs an empty hash object.
void Destroy ()
 Destroy the hash object, if created.
BOOL Create (HCRYPTPROV hProv, ALG_ID algId, HCRYPTKEY hKey=NULL, DWORD dwFlags=0)
 Create a new hash object.
BOOL Hash (const void *pbData, DWORD dwDataLen, DWORD dwFlags=0)
 Hash a block of data.
BOOL GetParam (DWORD dwParam, BYTE *pbData, DWORD *pdwDataLen, DWORD dwFlags=0)
 Get a parameter from the hash object.
BOOL GetSize (DWORD *pdwSize)
 Return the size of the hash.
BOOL GetValue (PBYTE pbData, DWORD *pdwDataLen)
 Get the hash value.
BOOL GetAlgId (ALG_ID *pAlgId)
 Get the algorithm id of the hash object.
 operator HCRYPTHASH () const
 HCRYPTHASH extractor.


Detailed Description

CryptoAPI hash wrapper.


Member Function Documentation

BOOL OW32::CCryptHash::Create HCRYPTPROV  hProv,
ALG_ID  algId,
HCRYPTKEY  hKey = NULL,
DWORD  dwFlags = 0
[inline]
 

Create a new hash object.

Returns:
TRUE if successful, FALSE if not.
Parameters:
hProv The cryptographic service provider to use.
algId The hashing algorithm
hKey For keyed hashes, the appropriate key
dwFlags Optional flags for CryptCreateHash

BOOL OW32::CCryptHash::GetAlgId ALG_ID *  pAlgId  )  [inline]
 

Get the algorithm id of the hash object.

Returns:
TRUE if successful, FALSE if not.
Parameters:
pAlgId The output algorithm ID

BOOL OW32::CCryptHash::GetParam DWORD  dwParam,
BYTE *  pbData,
DWORD *  pdwDataLen,
DWORD  dwFlags = 0
[inline]
 

Get a parameter from the hash object.

Returns:
TRUE if successful, FALSE if not.
Parameters:
pbData The output parameter data
dwDataLen The length of the output parameter data buffer on input, the amount of data output on output.
dwFlags Optional flags for CryptHashData

BOOL OW32::CCryptHash::GetSize DWORD *  pdwSize  )  [inline]
 

Return the size of the hash.

Returns:
TRUE if successful, FALSE if not.
Parameters:
pdwSize The output size.

BOOL OW32::CCryptHash::GetValue PBYTE  pbData,
DWORD *  pdwDataLen
[inline]
 

Get the hash value.

Returns:
TRUE if successful, FALSE if not.
Parameters:
pbData The output hash data
dwDataLen The length of the output hash data buffer on input, the amount of data output on output.

BOOL OW32::CCryptHash::Hash const void *  pbData,
DWORD  dwDataLen,
DWORD  dwFlags = 0
[inline]
 

Hash a block of data.

Returns:
TRUE if successful, FALSE if not.
Parameters:
pbData The data
dwDataLen The length of the data
dwFlags Optional flags for CryptHashData


The documentation for this class was generated from the following file:
Generated on Sun Jun 5 01:29:23 2005 for OW32 by  doxygen 1.3.9.1