#include <asymmetrickeys.h>
class CDHKeyPair : public CBase |
Protected Attributes | |
---|---|
CDHPrivateKey * | iPrivate |
CDHPublicKey * | iPublic |
Public Member Functions | |
---|---|
virtual | ~CDHKeyPair(void) |
IMPORT_C CDHKeyPair * | NewL(RInteger &, RInteger &) |
IMPORT_C CDHKeyPair * | NewL(RInteger &, RInteger &, RInteger &) |
IMPORT_C CDHKeyPair * | NewLC(RInteger &, RInteger &) |
IMPORT_C CDHKeyPair * | NewLC(RInteger &, RInteger &, RInteger &) |
IMPORT_C const CDHPrivateKey & | PrivateKey(void) |
IMPORT_C const CDHPublicKey & | PublicKey(void) |
Protected Member Functions | |
---|---|
CDHKeyPair(void) | |
IMPORT_C void | ConstructL(RInteger &, RInteger &) |
IMPORT_C void | ConstructL(RInteger &, RInteger &, RInteger &) |
This class is capable of generating a Diffie-Hellman (DH) public/private key pair.
IMPORT_C | ~CDHKeyPair | ( | void | ) | [virtual] |
The destructor frees all resources owned by the object, prior to its destruction.
IMPORT_C CDHKeyPair * | NewL | ( | RInteger & | aN, |
RInteger & | aG | |||
) | [static] |
Creates a new DH key pair from a random large integer, and a specified large prime and generator.
Parameter | Description |
---|---|
aN | The DH parameter, n (a large prime) |
aG | The DH parameter, g (the generator) |
Returns: A pointer to a new CDHKeyPair object
IMPORT_C CDHKeyPair * | NewL | ( | RInteger & | aN, |
RInteger & | aG, | |||
RInteger & | ax | |||
) | [static] |
Creates a new DH key pair from a specified large prime, generator, and random large integer.
Parameter | Description |
---|---|
aN | The DH parameter, n (a large prime) |
aG | The DH parameter, g (the generator) |
ax | The DH value, x (a random large integer) |
Returns: A pointer to a new CDHKeyPair object
IMPORT_C CDHKeyPair * | NewLC | ( | RInteger & | aN, |
RInteger & | aG | |||
) | [static] |
Creates a new DH key pair from a random large integer, and a specified large prime and generator.
The returned pointer is put onto the cleanup stack.
Parameter | Description |
---|---|
aN | The DH parameter, n (a large prime) |
aG | The DH parameter, g (the generator) |
Returns: A pointer to a new CDHKeyPair object
IMPORT_C CDHKeyPair * | NewLC | ( | RInteger & | aN, |
RInteger & | aG, | |||
RInteger & | ax | |||
) | [static] |
Creates a new DH key pair from a specified large prime, generator, and random large integer.
The returned pointer is put onto the cleanup stack.
Parameter | Description |
---|---|
aN | The DH parameter, n (a large prime) |
aG | The DH parameter, g (the generator) |
ax | The DH value, x (a random large integer) |
Returns: A pointer to a new CDHKeyPair object
IMPORT_C const CDHPrivateKey & | PrivateKey | ( | void | ) | const |
Gets the DH private key
Returns: The DH private key