class OpenSSLKeyImpl

This class wraps an ssl ENV_PKEY structure which it assumes contains a private and public RSA key pair.

Inheritance:


Public Methods

[more]virtual ~OpenSSLKeyImpl ()
Destructor
[more]string privateDecrypt (const string &encrypted) const
Uses the contained private RSA key to decrypt the input string.
[more]string privateEncrypt (const string &data) const
Uses the contained private RSA key to encrypt the input string.
[more]string publicDecrypt (const string &encrypted) const
Uses the contained public RSA key to decrypt the input string.
[more]string publicEncrypt (const string &data) const
Uses the contained public RSA key to encrypt the input string.
[more]int size () const
Returns ENV_PKey_size of the contained ENV_Pkey
[more]string format () const
Returns DER
[more]string algorithm () const
Returns RSA

Protected Methods

[more] OpenSSLKeyImpl (EVP_PKEY* evp)
Constructor


Documentation

This class wraps an ssl ENV_PKEY structure which it assumes contains a private and public RSA key pair. It implements methods to use either the private or public key to encypt or decrypt an input string.

ovirtual ~OpenSSLKeyImpl()
Destructor

ostring privateDecrypt(const string &encrypted) const
Uses the contained private RSA key to decrypt the input string.

Throws:
SecurityException OpenSSLRSAPrivateKeyImpl: decryption failure
Parameters:
encrypted - the data to be decrypted
Returns:
s the decyrpted string

ostring privateEncrypt(const string &data) const
Uses the contained private RSA key to encrypt the input string.

Throws:
SecurityException OpenSSLRSAPrivateKeyImpl: encryption failure
Parameters:
data - the data to be encrypted
Returns:
the encyrpted string.

ostring publicDecrypt(const string &encrypted) const
Uses the contained public RSA key to decrypt the input string.

Throws:
SecurityException OpenSSLRSAPublicKeyImpl: decryption failure
Parameters:
encrypted - the data to be decrypted
Returns:
the decyrpted string

ostring publicEncrypt(const string &data) const
Uses the contained public RSA key to encrypt the input string.

Throws:
SecurityException OpenSSLRSAPublicKeyImpl: encryption failure
Parameters:
data - the data to be encrypted
Returns:
the encyrpted string.

oint size() const
Returns ENV_PKey_size of the contained ENV_Pkey

ostring format() const
Returns DER

ostring algorithm() const
Returns RSA

o OpenSSLKeyImpl(EVP_PKEY* evp)
Constructor


This class has no child classes.
Author:
Srilekha Mudumbai Abdelilah Essiari
Version:
1.1 00/05/01

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.