#include <WinCAPICryptoKeyHMAC.hpp>
Inheritance diagram for WinCAPICryptoKeyHMAC:
Used to provide HMAC keys to WinCAPI CryptoHashHMAC
Provides two types of key.
A Windows Key (via setWinKey) is a direct key that can be used by the Windows HMAC implementation.
A byte key (via setKey) is a string of bytes that will be used as a key. This requires an internal implementation of an HMAC using the Windows Digest functions, as the Windows API does not allow direct loading of these keys.
Public Member Functions | |
Constructors and Destructors | |
WinCAPICryptoKeyHMAC (HCRYPTPROV prov) | |
Constructor. | |
virtual | ~WinCAPICryptoKeyHMAC () |
Key Interface methods | |
virtual XSECCryptoKey::KeyType | getKeyType () |
Return the type of this key. | |
virtual XSECCryptoKey * | clone () |
Replicate key. | |
virtual const XMLCh * | getProviderName () |
Return the WinCAPI string identifier. | |
Optional Interface methods | |
virtual void | setKey (unsigned char *inBuf, unsigned int inLength) |
Set the key. | |
virtual unsigned int | getKey (safeBuffer &outBuf) |
Get the key value. | |
Windows specific keys | |
void | setWinKey (HCRYPTKEY k) |
Set a Windows key. | |
HCRYPTKEY | getWinKey (void) |
Get a windows key. | |
HCRYPTPROV | getWinKeyProv (void) |
Get a windows key provider. |
|
Constructor.
|
|
|
|
Replicate key.
Implements XSECCryptoKeyHMAC. |
|
Get the key value. Copy the key into the safeBuffer and return the number of bytes copied.
Implements XSECCryptoKeyHMAC. |
|
Return the type of this key. For DSA keys, this allows people to determine whether this is a public key, private key or a key pair Reimplemented from XSECCryptoKeyHMAC. |
|
Return the WinCAPI string identifier.
Implements XSECCryptoKey. |
|
Get a windows key. Used by WinCAPICryptoHashHMAC to retrieve the key in order to load it into the HMAC function.
|
|
Get a windows key provider. Used by WinCAPICryptoHashHMAC to retrieve the provider handle associated with an HMAC key in order to load it into the HMAC function.
|
|
Set the key. Set the key from the buffer
Implements XSECCryptoKeyHMAC. |
|
Set a Windows key. Set a Windows Crypto key that has been either derived via the various Crypt functions or has been loaded from an encrypted BLOB
|