#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 | ) | [protected] |
Default constructor
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.
Parameters | |
---|---|
aN | The DH parameter, n (a large prime) |
aG | The DH parameter, g (the generator) |
Leave Codes | |
---|---|
KErrArgument | If aG is out of bounds |
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.
Parameters | |
---|---|
aN | The DH parameter, n (a large prime) |
aG | The DH parameter, g (the generator) |
ax | The DH value, x (a random large integer) |
Leave Codes | |
---|---|
KErrArgument | If either aG or ax are out of bounds |
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.
Parameters | |
---|---|
aN | The DH parameter, n (a large prime) |
aG | The DH parameter, g (the generator) |
Leave Codes | |
---|---|
KErrArgument | If aG is out of bounds |
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.
Parameters | |
---|---|
aN | The DH parameter, n (a large prime) |
aG | The DH parameter, g (the generator) |
ax | The DH value, x (a random large integer) |
Leave Codes | |
---|---|
KErrArgument | If either aG or ax are out of bounds |
IMPORT_C const CDHPrivateKey & | PrivateKey | ( | void | ) | const |
Gets the DH private key
IMPORT_C const CDHPublicKey & | PublicKey | ( | void | ) | const |
Gets the DH public key