#include <PKIFCNGCAPIRaw.h>
This class provides an interface to symmetric key functionality provided by Microsoft CAPI.
TSP-enforcing: No
Definition at line 28 of file PKIFCNGCAPIRaw.h.
Public Types | |
enum | { thisComponent = TOOLKIT_CRYPTO_CAPIRAW } |
Public Member Functions | |
CPKIFCNGCAPIRaw (void) | |
virtual | ~CPKIFCNGCAPIRaw (void) |
void | Initialize () |
void | GenRandom (unsigned char *buf, int len) |
IPKIFHashContext * | HashInit (PKIFCRYPTO::HASH_ALG alg) |
void | HashUpdate (IPKIFHashContext *hash, unsigned char *pData, int nDataLen) |
void | HashFinal (IPKIFHashContext *hash, unsigned char *pResult, int *pnResultLen) |
bool | SupportsAlgorithm (const CPKIFKeyMaterial &key) |
void | Sign (const CPKIFKeyMaterial &key, unsigned char *pHashData, int nHashDataLen, unsigned char *pSignature, int *nSignatureLen, PKIFCRYPTO::HASH_ALG hashAlg) |
void | Decrypt (const CPKIFKeyMaterial &key, unsigned char *pData, int nDataLen, unsigned char *pResult, int *pnResultLen, bool pad=true) |
void | Encrypt (const CPKIFKeyMaterial &key, unsigned char *pData, int nDataLen, unsigned char *pResult, int *pnResultLen, bool pad=true) |
bool | Verify (const CPKIFKeyMaterial &key, unsigned char *pHashData, int nHashDataLen, unsigned char *pSignature, int nSignatureLen, PKIFCRYPTO::HASH_ALG hashAlg) |
bool | VerifyCertificate (const CPKIFCertificate &issCert, const CPKIFCertificate &subCert) |
IPKIFRawCryptContext * | CryptInit (const CPKIFKeyMaterial &key, bool pad=true) |
void | Decrypt (IPKIFRawCryptContext *cryptContext, unsigned char *pData, int nDataLen, unsigned char *pResult, int *pnResultLen, bool final) |
void | Encrypt (IPKIFRawCryptContext *cryptContext, unsigned char *pData, int nDataLen, unsigned char *pResult, int *pnResultLen, bool final) |
IPKIFRawCryptContext * | HMACInit (const CPKIFKeyMaterial &key, PKIFCRYPTO::HASH_ALG ha) |
void | HMACUpdate (IPKIFRawCryptContext *ctx, unsigned char *pData, int nDataLen) |
void | HMACFinal (IPKIFRawCryptContext *ctx, unsigned char *pResult, int *pnResultLen) |
anonymous enum |
CPKIFCNGCAPIRaw::CPKIFCNGCAPIRaw | ( | void | ) |
Interface: External
This function creates CPKIFCNGCAPIRaw objects. As with all colleague objects, a call to Initialize is necessary before using instances of this class, i.e. construction and initialization requires two steps
Definition at line 109 of file PKIFCNGCAPIRaw.cpp.
References LOG_STRING_DEBUG, and TOOLKIT_CRYPTO_CAPIRAW.
CPKIFCNGCAPIRaw::~CPKIFCNGCAPIRaw | ( | void | ) | [virtual] |
Interface: External
This function destroys CPKIFCNGCAPIRaw objects
Definition at line 125 of file PKIFCNGCAPIRaw.cpp.
References LOG_STRING_DEBUG, and TOOLKIT_CRYPTO_CAPIRAW.
void CPKIFCNGCAPIRaw::Initialize | ( | void | ) | [virtual] |
Interface: External
This function initializes an instance of CPKIFCNGCAPIRaw for use
Reimplemented from IPKIFColleague.
Definition at line 149 of file PKIFCNGCAPIRaw.cpp.
References LOG_STRING_DEBUG, and TOOLKIT_CRYPTO_CAPIRAW.
void CPKIFCNGCAPIRaw::GenRandom | ( | unsigned char * | buf, | |
int | len | |||
) | [virtual] |
Interface: External
This function will populate buf with len bytes of random data. The buf parameter is assumed to be at least len bytes in size. This function may generate an exception containing one of the following error codes PKIFCAPI_ACQUIRE_CONTEXT_FAILED and PKIFCAPI_GEN_RANDOM_FAILED
CPKIFCryptoException(PKIFCAPI_ACQUIRE_CONTEXT_FAILED) | ||
CPKIFCryptoException(PKIFCAPI_GEN_RANDOM_FAILED) |
buf | [in/out] Pointer to a buffer of at least len b ytes to receive randomly generated data |
len | [in] Integer identifying the number of random bytes desired and the size of the buf parameter |
Implements IPKIFCryptoMisc.
Definition at line 675 of file PKIFCNGCAPIRaw.cpp.
References LOG_STRING_DEBUG, NT_SUCCESS, PKIFCAPI_ACQUIRE_CONTEXT_FAILED, PKIFCAPI_GEN_RANDOM_FAILED, RAISE_CRYPTO_EXCEPTION, thisComponent, and TOOLKIT_CRYPTO_CAPIRAW.
IPKIFHashContext * CPKIFCNGCAPIRaw::HashInit | ( | PKIFCRYPTO::HASH_ALG | alg | ) | [virtual] |
Interface: External
This function is used to prepare a hash context object that uses the specified algorithm to produce a hash of data subsequently passed to HashUpdate using the returned context. See HashFinal in the CPKIFCryptoMediator2 section for a complete hashing example. This function may generate an exception containing one of the following error codes PKIFCAPI_ACQUIRE_CONTEXT_FAILED, PKIFCAPI_CREATE_HASH_FAILED and CRYPTO_ALG_NOT_SUPPORTED.
CPKIFCryptoException(PKIFCAPI_ACQUIRE_CONTEXT_FAILED) | ||
CPKIFCryptoException(PKIFCAPI_CREATE_HASH_FAILED) | ||
CPKIFCryptoException(CRYPTO_ALG_NOT_SUPPORTED) |
alg | [in] HASH_ALG value indicating the type of hash algorithm for which a hash context object should be created |
Implements IPKIFCryptoMisc.
Definition at line 716 of file PKIFCNGCAPIRaw.cpp.
References CRYPTO_ALG_NOT_SUPPORTED, GetCNGHashAlg(), LOG_STRING_DEBUG, CPKIFCAPIHashContext::m_cngHashHandle, CPKIFCAPIHashContext::m_hHashAlg, CPKIFCAPIHashContext::m_pbHashObject, NT_SUCCESS, PKIFCAPI_CREATE_HASH_FAILED, RAISE_CRYPTO_EXCEPTION, PKIFCRYPTO::SHA1, PKIFCRYPTO::SHA256, PKIFCRYPTO::SHA384, PKIFCRYPTO::SHA512, STATUS_UNSUCCESSFUL, thisComponent, TOOLKIT_CRYPTO, and TOOLKIT_CRYPTO_CAPIRAW.
void CPKIFCNGCAPIRaw::HashUpdate | ( | IPKIFHashContext * | hash, | |
unsigned char * | pData, | |||
int | nDataLen | |||
) | [virtual] |
Interface: External
This function is used to contribute data to a hash context. See HashFinal in the CPKIFCryptoMediator2 section for a complete hashing example. This function may generate an exception containing one of the following error codes PKIFCAPI_INCORRECT_HASH_CONTEXT, PKIFCAPI_EMPTY_HASH_CONTEXT, PKIFCAPI_MISC_HASH_CALL_FAILED
CPKIFCryptoException(PKIFCAPI_INCORRECT_HASH_CONTEXT) | ||
CPKIFCryptoException(PKIFCAPI_EMPTY_HASH_CONTEXT) | ||
CPKIFCryptoException(PKIFCAPI_MISC_HASH_CALL_FAILED) |
hash | [in] Pointers to an IPKIFHashContext object created by a previous call to HashInit |
pData | [in] Pointer to a buffer containing data that should be hashed as part of the running hash operation |
nDataLen | [in] Integer indicating the length of the buffer passed via the pData parameter |
Implements IPKIFCryptoMisc.
Definition at line 834 of file PKIFCNGCAPIRaw.cpp.
References COMMON_INVALID_INPUT, LOG_STRING_DEBUG, CPKIFCAPIHashContext::m_cngHashHandle, NT_SUCCESS, PKIFCAPI_CREATE_HASH_FAILED, PKIFCAPI_EMPTY_HASH_CONTEXT, PKIFCAPI_INCORRECT_HASH_CONTEXT, RAISE_CRYPTO_EXCEPTION, STATUS_UNSUCCESSFUL, thisComponent, TOOLKIT_CRYPTO, and TOOLKIT_CRYPTO_CAPIRAW.
void CPKIFCNGCAPIRaw::HashFinal | ( | IPKIFHashContext * | hash, | |
unsigned char * | pResult, | |||
int * | pnResultLen | |||
) | [virtual] |
Interface: External
This function is used to retrieve the result from a hash context. Hash contexts are not valid after a call to HashFinal and should be deleted. See HashFinal in the CPKIFCryptoMediator2 section for a complete hashing example. This function may generate an exception containing one of the following error codes PKIFCAPI_INCORRECT_HASH_CONTEXT, PKIFCAPI_EMPTY_HASH_CONTEXT, PKIFCAPI_MISC_HASH_CALL_FAILED
CPKIFCryptoException(PKIFCAPI_INCORRECT_HASH_CONTEXT) | ||
CPKIFCryptoException(PKIFCAPI_EMPTY_HASH_CONTEXT) | ||
CPKIFCryptoException(PKIFCAPI_MISC_HASH_CALL_FAILED) | ||
CPKIFCryptoException(COMMON_INVALID_INPUT) |
hash | [in] Pointers to an IPKIFHashContext object created by a previous call to HashInit |
pResult | [out] Pointer to a buffer of sufficient size to receive the result of a hash operation |
pnResultLen | [in/out] Pointer to an integer used to pass the length of the pResult parameter to HashFinal and to return the size of the hash result passed from HashFinal |
Implements IPKIFCryptoMisc.
Definition at line 889 of file PKIFCNGCAPIRaw.cpp.
References COMMON_INVALID_INPUT, LOG_STRING_DEBUG, CPKIFCAPIHashContext::m_cngHashHandle, NT_SUCCESS, PKIFCAPI_EMPTY_HASH_CONTEXT, PKIFCAPI_INCORRECT_HASH_CONTEXT, PKIFCAPI_MISC_HASH_CALL_FAILED, RAISE_CRYPTO_EXCEPTION, STATUS_UNSUCCESSFUL, thisComponent, TOOLKIT_CRYPTO, and TOOLKIT_CRYPTO_CAPIRAW.
bool CPKIFCNGCAPIRaw::SupportsAlgorithm | ( | const CPKIFKeyMaterial & | key | ) | [virtual] |
Interface: External
This function is used to query an instance for support of the algorithm identified by the key parameter. Algorithm support depends on the constructor parameters specified for an instance. This function may generate an exception containing one of the following error codes PKIFCAPI_CREATE_CERT_FAILED and CRYPTO_ALG_NOT_SUPPORTED
true | if the algorithm specified by the key parameter is supported | |
false | if the algorithm specified by the key parameter is not supported |
CPKIFCryptoException(PKIFCAPI_CREATE_CERT_FAILED) | ||
CPKIFCryptoException(CRYPTO_ALG_NOT_SUPPORTED) | ||
CPKIFCryptoException(COMMON_INVALID_INPUT) |
key | [in] Reference to a CPKIFKeyMaterial object containing at least an algorithm identifier |
Implements IPKIFCryptoAlgSupport.
Definition at line 198 of file PKIFCNGCAPIRaw.cpp.
References COMMON_INVALID_INPUT, CPKIFKeyMaterial::ContainsCertificate(), CPKIFKeyMaterial::ContainsSymmetricKeyMaterial(), CRYPTO_ALG_NOT_SUPPORTED, DSA_CLASS, ECDSA_CLASS, GetAlgClass(), CPKIFKeyMaterial::GetCertificate(), CPKIFKeyMaterial::GetCertificateLength(), GetCNGSymAlgorithm(), CPKIFException::GetErrorCode(), LOG_STRING_DEBUG, RAISE_CRYPTO_EXCEPTION, RSA_CLASS, thisComponent, and TOOLKIT_CRYPTO_CAPIRAW.
void CPKIFCNGCAPIRaw::Sign | ( | const CPKIFKeyMaterial & | key, | |
unsigned char * | pHashData, | |||
int | nHashDataLen, | |||
unsigned char * | pSignature, | |||
int * | nSignatureLen, | |||
PKIFCRYPTO::HASH_ALG | hashAlg | |||
) | [virtual] |
Interface: External
This function throws an exception. Digital signature generation using raw key material is not currently supported
CPKIFCryptoException(COMMON_NOT_IMPLEMENTED) |
key | [in] Reference to a CPKIFKeyMaterial object containing key material to use for signature generation |
pHashData | [in] Pointer to a buffer containing the message digest to sign |
nHashDataLen | [in] Integer indicating the length of the buffer passed via the pHashData parameter |
pSignature | [out] Pointer to a buffer to receive the generated digital signature |
nSignatureLen | [in/out] Pointer to a integer used to pass the size of the pSignature buffer to Sign and to return the size of the generated signature from |
hashAlg | [in] Hash algorithm used in the signature |
Implements IPKIFCryptoRawOperations.
Definition at line 265 of file PKIFCNGCAPIRaw.cpp.
References COMMON_NOT_IMPLEMENTED, LOG_STRING_DEBUG, RAISE_CRYPTO_EXCEPTION, thisComponent, and TOOLKIT_CRYPTO_CAPIRAW.
void CPKIFCNGCAPIRaw::Decrypt | ( | const CPKIFKeyMaterial & | key, | |
unsigned char * | pData, | |||
int | nDataLen, | |||
unsigned char * | pResult, | |||
int * | pnResultLen, | |||
bool | pad = true | |||
) | [virtual] |
Interface: External
This function performs decryption using symmetric key material. This function takes a key material object.
key | [in] Reference to a CPKIFKeyMaterial object containing key material to use when decrypting the data |
pData | [in] Pointer to a buffer containing ciphertext to decrypt |
nDataLen | [in] Integer indicating the size of the buffer passed via the pData parameter |
pResult | [out] Pointer to a buffer to receive the decrypted data |
pnResultLen | [in/out] Pointer to an integer used to pass the size of the pResult parameter to Decrypt and to return the size of the decrypted data from Decrypt |
pad | [in] PADDING value that indicates the padding scheme that applies to the data. Currently the only support padding scheme is defined in PKCS #5 |
Implements IPKIFCryptoRawOperations.
Definition at line 408 of file PKIFCNGCAPIRaw.cpp.
References CPKIFKeyMaterial::ContainsSymmetricKeyMaterial(), and CryptInit().
void CPKIFCNGCAPIRaw::Encrypt | ( | const CPKIFKeyMaterial & | key, | |
unsigned char * | pData, | |||
int | nDataLen, | |||
unsigned char * | pResult, | |||
int * | pnResultLen, | |||
bool | pad = true | |||
) | [virtual] |
Interface: External
This function performs encryption using symmetric key material. This function takes a key material object.
key | [in] Reference to a CPKIFKeyMaterial object containing key material to use when encrypting the data |
pData | [in] Pointer to a buffer containing plaintext to encrypt |
nDataLen | [in] Integer indicating the size of the buffer passed via the pData parameter |
pResult | [out] Pointer to a buffer to receive the encrypted data |
pnResultLen | [in/out] Pointer to an integer used to pass the size of the pResult parameter to Encrypt and to return the size of the encrypted data from Decrypt |
pad | [in] PADDING value that indicates the padding scheme that applies to the data. Currently the only support padding scheme is defined in PKCS #5 |
Implements IPKIFCryptoRawOperations.
Definition at line 441 of file PKIFCNGCAPIRaw.cpp.
References CPKIFKeyMaterial::ContainsSymmetricKeyMaterial(), and CryptInit().
bool CPKIFCNGCAPIRaw::Verify | ( | const CPKIFKeyMaterial & | key, | |
unsigned char * | pHashData, | |||
int | nHashDataLen, | |||
unsigned char * | pSignature, | |||
int | nSignatureLen, | |||
PKIFCRYPTO::HASH_ALG | hashAlg | |||
) | [virtual] |
Interface: External
This function verifies a digital signature over the given data using the public key from the specified key (which most likely includes an X.509 certificate). All Verify functions assume the data passed is a hash of the data to be verified, i.e. this function perform no hashing
key | [in] Reference to a CPKIFKeyMaterial object containing key material to use when verifying the signature |
pHashData | [in] Pointer to a buffer containing the message digest that was signed to produce the signature conveyed via the pSignature parameter |
nHashDataLen | [in] Integer indicating the length of the value passed via the pHashData parameter |
pSignature | [in] Pointer to a buffer containing the signature to verify |
nSignatureLen | [in] Integer indicating the size of the value passed via the pSignature parameter |
hashAlg | [in] Hash algorithm used with signature |
Implements IPKIFCryptoRawOperations.
Definition at line 645 of file PKIFCNGCAPIRaw.cpp.
References _CNGVerify().
bool CPKIFCNGCAPIRaw::VerifyCertificate | ( | const CPKIFCertificate & | issCert, | |
const CPKIFCertificate & | subCert | |||
) | [virtual] |
Interface: External
This convenience function can be used to verify signatures on a certificate given a subject certificate and the certificate of its issuer
issCert | [in] Reference to a smart pointer to a CPKIFCertificate object containing the certificate to use when verifying the certificate passed via the subCert parameter |
subCert | [in] Reference to a smart pointer to a CPKIFCertificate object containing the certificate to verify using the certificate passed via the issCert parameter |
Implements IPKIFCryptoRawOperations.
Definition at line 603 of file PKIFCNGCAPIRaw.cpp.
References CPKIFCertificate::Encoded(), LOG_STRING_DEBUG, and TOOLKIT_CRYPTO_CAPIRAW.
IPKIFRawCryptContext * CPKIFCNGCAPIRaw::CryptInit | ( | const CPKIFKeyMaterial & | key, | |
bool | pad = true | |||
) | [virtual] |
Interface: External
This function is used to prepare a crypt context object with presented key material. The crypt context object may then be passed to operations that perform cryptographic operations using the key material. This function is typically used to prepare for operations on large amounts of data. This function may generate an exception containing one of the following error codes
CPKIFCryptoException(PKIFCAPI_ACQUIRE_CONTEXT_FAILED) | ||
CPKIFCryptoException(PKIFCAPI_CREATE_CERT_FAILED) | ||
CPKIFCryptoException(PKIFCAPI_KEY_IMPORT_FAILED) | ||
CPKIFCryptoException(PKIFCAPI_SET_MODE_FAILED) | ||
CPKIFCryptoException(PKIFCAPI_SET_IV_FAILED) | ||
CPKIFCryptoException(CRYPTO_ALG_NOT_SUPPORTED) | ||
CPKIFCryptoException(CRYPTO_MODE_NOT_SUPPORTED) | ||
CPKIFCryptoException(CRYPTO_MISSING_IV) | ||
CPKIFCryptoException(COMMON_INVALID_INPUT) | ||
CPKIFCryptoException(PKIFCAPI_SESSION_KEY_ENCRYPT_FAILED) | ||
CPKIFCryptoException(PKIFCAPI_KEY_IMPORT_FAILED) |
key | [in] Reference to a smart pointer to a CPKIFKeyMaterial object containing the key material to use for an Encryption or Decryption operation |
pad | [in] A boolean value indicating if padding should be applied |
Implements IPKIFCryptoRawOperations.
Definition at line 978 of file PKIFCNGCAPIRaw.cpp.
References PKIFCRYPTO::CBC, COMMON_INVALID_INPUT, CPKIFKeyMaterial::ContainsSymmetricKeyMaterial(), CRYPTO_MISSING_IV, CRYPTO_MODE_NOT_SUPPORTED, PKIFCRYPTO::ECB, GetCNGSymAlgorithm(), CPKIFKeyMaterial::GetIV(), CPKIFKeyMaterial::GetMode(), CPKIFKeyMaterial::GetSymmetricKey(), CPKIFKeyMaterial::GetSymmetricKeyAlgorithm(), LOG_STRING_DEBUG, NT_SUCCESS, PKIFCAPING_GENERATE_SYM_KEY_FAILED, PKIFCAPING_GET_PROPERTY_FAILED, PKIFCAPING_OPEN_ALG_PROVIDER_FAILED, PKIFCAPING_SET_PROPERTY_FAILED, RAISE_CRYPTO_EXCEPTION, PKIFScopedArray< T >::release(), STATUS_UNSUCCESSFUL, thisComponent, TOOLKIT_CRYPTO, and TOOLKIT_CRYPTO_CAPIRAW.
void CPKIFCNGCAPIRaw::Decrypt | ( | IPKIFRawCryptContext * | cryptContext, | |
unsigned char * | pData, | |||
int | nDataLen, | |||
unsigned char * | pResult, | |||
int * | pnResultLen, | |||
bool | final | |||
) | [virtual] |
Interface: External
This function performs decryption using symmetric key material. This function takes a crypt context and can be used when operating on large blocks of data.
cryptContext | [in] Pointer to an IPKIFRawCryptContext object created via a call to CryptInit and containing the key material to use when decrypting |
pData | [in] Pointer to a buffer containing ciphertext to decrypt |
nDataLen | [in] Integer indicating the size of the buffer passed via the pData parameter |
pResult | [out] Pointer to a buffer to receive the decrypted data |
pnResultLen | [in/out] Pointer to an integer used to pass the size of the pResult parameter to Decrypt and to return the size of the decrypted data from |
final | [in] Boolean that indicates if more data will be passed via a subsequent call to Decrypt (false if more data will be passed and true if this is the final call to Decrypt for this ciphertext) |
Implements IPKIFCryptoRawOperations.
Definition at line 1113 of file PKIFCNGCAPIRaw.cpp.
void CPKIFCNGCAPIRaw::Encrypt | ( | IPKIFRawCryptContext * | cryptContext, | |
unsigned char * | pData, | |||
int | nDataLen, | |||
unsigned char * | pResult, | |||
int * | pnResultLen, | |||
bool | final | |||
) | [virtual] |
Interface: External
This function performs encryption using symmetric key material. This function can be used when operating on large blocks of data
cryptContext | [in] Pointer to an IPKIFRawCryptContext object created via a call to CryptInit and containing the key material to use when encrypting |
pData | [in] Pointer to a buffer containing plaintext to encrypt |
nDataLen | [in] Integer indicating the size of the buffer passed via the pData parameter |
pResult | [out] Pointer to a buffer to receive the encrypted data |
pnResultLen | [in/out] Pointer to an integer used to pass the size of the pResult parameter to Encrypt and to return the size of the encrypted data |
final | [in] Boolean that indicates if more data will be passed via a subsequent call to Encrypt (false if more data will be passed and true if this is the final call to Encrypt for this plaintext) |
Implements IPKIFCryptoRawOperations.
Definition at line 1140 of file PKIFCNGCAPIRaw.cpp.
IPKIFRawCryptContext * CPKIFCNGCAPIRaw::HMACInit | ( | const CPKIFKeyMaterial & | key, | |
PKIFCRYPTO::HASH_ALG | ha | |||
) | [virtual] |
Interface: External
This function is not implemented for this colleague.
CPKIFCryptoException(PKIF_NSS_UNSUPPORTED_ALG) | ||
CPKIFCryptoException(PKIF_NSS_RAW_IMPORT_FAILED) | ||
CPKIFCryptoException(COMMON_INVALID_INPUT) |
Implements IPKIFCryptoRawOperations.
Definition at line 1532 of file PKIFCNGCAPIRaw.cpp.
References CRYPTO_ALG_NOT_SUPPORTED, CPKIFKeyMaterial::GetSymmetricKey(), CPKIFKeyMaterial::GetSymmetricKeyLength(), LOG_STRING_DEBUG, CPKIFCAPIRawCryptContext::m_cngHashHandle, NT_SUCCESS, PKIFCAPI_CREATE_HASH_FAILED, RAISE_CRYPTO_EXCEPTION, PKIFCRYPTO::SHA1, PKIFCRYPTO::SHA256, PKIFCRYPTO::SHA384, PKIFCRYPTO::SHA512, STATUS_UNSUCCESSFUL, thisComponent, and TOOLKIT_CRYPTO.
void CPKIFCNGCAPIRaw::HMACUpdate | ( | IPKIFRawCryptContext * | ctx, | |
unsigned char * | pData, | |||
int | nDataLen | |||
) | [virtual] |
Interface: External
This function is not implemented for this colleague
CPKIFCryptoException(PKIFNSS_INCORRECT_HASH_CONTEXT) | ||
CPKIFCryptoException(PKIFNSS_EMPTY_HASH_CONTEXT) | ||
CPKIFCryptoException(PKIFNSS_DIGEST_OP_FAILED) |
Implements IPKIFCryptoRawOperations.
Definition at line 1648 of file PKIFCNGCAPIRaw.cpp.
References COMMON_INVALID_INPUT, LOG_STRING_DEBUG, CPKIFCAPIRawCryptContext::m_cngHashHandle, NT_SUCCESS, PKIFCAPI_CREATE_HASH_FAILED, PKIFCAPI_EMPTY_HASH_CONTEXT, PKIFCAPI_INCORRECT_HASH_CONTEXT, RAISE_CRYPTO_EXCEPTION, STATUS_UNSUCCESSFUL, thisComponent, and TOOLKIT_CRYPTO.
void CPKIFCNGCAPIRaw::HMACFinal | ( | IPKIFRawCryptContext * | ctx, | |
unsigned char * | pResult, | |||
int * | pnResultLen | |||
) | [virtual] |
Interface: External
This function is not implemented for this colleague
CPKIFCryptoException(PKIFNSS_INCORRECT_HASH_CONTEXT) | ||
CPKIFCryptoException(PKIFNSS_EMPTY_HASH_CONTEXT) | ||
CPKIFCryptoException(PKIFNSS_DIGEST_OP_FAILED) |
Implements IPKIFCryptoRawOperations.
Definition at line 1694 of file PKIFCNGCAPIRaw.cpp.
References COMMON_INVALID_INPUT, LOG_STRING_DEBUG, CPKIFCAPIRawCryptContext::m_cngHashHandle, NT_SUCCESS, PKIFCAPI_CREATE_HASH_FAILED, PKIFCAPI_EMPTY_HASH_CONTEXT, PKIFCAPI_INCORRECT_HASH_CONTEXT, RAISE_CRYPTO_EXCEPTION, STATUS_UNSUCCESSFUL, thisComponent, and TOOLKIT_CRYPTO.