#include <OpenSSLCryptoKeyRSA.hpp>
Inheritance diagram for OpenSSLCryptoKeyRSA:
The library uses classes derived from this to process RSA keys.
Public Member Functions | |
Constructors and Destructors | |
OpenSSLCryptoKeyRSA () | |
virtual | ~OpenSSLCryptoKeyRSA () |
Key Interface methods | |
virtual XSECCryptoKey::KeyType | getKeyType () |
Return the type of this key. | |
virtual const XMLCh * | getProviderName () |
Return the OpenSSL identifier string. | |
virtual XSECCryptoKey * | clone () |
Replicate key. | |
Mandatory RSA interface methods | |
These classes are required by the library. | |
virtual void | setOAEPparams (unsigned char *params, unsigned int paramsLen) |
Set the OAEPparams string. | |
virtual unsigned int | getOAEPparamsLen (void) |
Get OAEPparams Length. | |
virtual const unsigned char * | getOAEPparams (void) |
Get the OAEPparams. | |
virtual bool | verifySHA1PKCS1Base64Signature (const unsigned char *hashBuf, unsigned int hashLen, const char *base64Signature, unsigned int sigLen) |
Verify a SHA1 PKCS1 encoded signature. | |
virtual unsigned int | signSHA1PKCS1Base64Signature (unsigned char *hashBuf, unsigned int hashLen, char *base64SignatureBuf, unsigned int base64SignatureBufLen) |
Create a signature. | |
virtual unsigned int | privateDecrypt (const unsigned char *inBuf, unsigned char *plainBuf, unsigned int inLength, unsigned int maxOutLength, PaddingType padding, hashMethod hm) |
Decrypt using private key. | |
virtual unsigned int | publicEncrypt (const unsigned char *inBuf, unsigned char *cipherBuf, unsigned int inLength, unsigned int maxOutLength, PaddingType padding, hashMethod hm) |
Encrypt using a public key. | |
virtual unsigned int | getLength (void) |
Obtain the length of an RSA key. | |
Optional Interface methods | |
Have been implemented to allow interoperability testing | |
virtual void | loadPublicModulusBase64BigNums (const char *b64, unsigned int len) |
Load the modulus. | |
virtual void | loadPublicExponentBase64BigNums (const char *b64, unsigned int len) |
Load the exponent. | |
OpenSSL specific methods | |
OpenSSLCryptoKeyRSA (EVP_PKEY *k) | |
Constructor to create the object around an existing OpenSSL RSA key. |
|
|
|
|
|
Constructor to create the object around an existing OpenSSL RSA key.
|
|
Replicate key.
Implements XSECCryptoKeyRSA. |
|
Return the type of this key. For RSA keys, this allows people to determine whether this is a public key, private key or a key pair Reimplemented from XSECCryptoKeyRSA. |
|
Obtain the length of an RSA key.
Implements XSECCryptoKeyRSA. |
|
Get the OAEPparams.
Implements XSECCryptoKeyRSA. |
|
Get OAEPparams Length.
Implements XSECCryptoKeyRSA. |
|
Return the OpenSSL identifier string.
Implements XSECCryptoKey. |
|
Load the exponent. Load the exponent from a Base64 encoded string param b64 A buffer containing the encoded string param len The length of the data in the buffer Implements XSECCryptoKeyRSA. |
|
Load the modulus. Load the modulus from a Base64 encoded string param b64 A buffer containing the encoded string param len The length of the data in the buffer Implements XSECCryptoKeyRSA. |
|
Decrypt using private key. The library will call this function to decrypt a piece of cipher text using the private component of this key.
Implements XSECCryptoKeyRSA. |
|
Encrypt using a public key. The library will call this function to encrypt a plain text buffer using the public component of this key.
Implements XSECCryptoKeyRSA. |
|
Set the OAEPparams string. By default, the library expects crypto implementations to perform OAEP padding with no params. This call allows the library (or user) to set a params value prior to an encrypt/decrypt operation.
Implements XSECCryptoKeyRSA. |
|
Create a signature. The library will call this function to create a signature from a pre-calculated digest. The output signature will be Base64 encoded such that it can be placed directly into the XML document
Implements XSECCryptoKeyRSA. |
|
Verify a SHA1 PKCS1 encoded signature. The library will call this function to validate an RSA signature The standard by default uses SHA1 in a PKCS1 encoding.
Implements XSECCryptoKeyRSA. |