TNL::AsymmetricKey class Reference
TNL::AsymmetricKey Class Reference
#include <tnlAsymmetricKey.h>
Inheritance diagram for TNL::AsymmetricKey:
Member Enumeration Documentation
|
Enum used to indicate the portion of the key we are working with.
- Enumeration values:
-
KeyTypePrivate |
|
KeyTypePublic |
|
|
Constructor & Destructor Documentation
TNL::AsymmetricKey::AsymmetricKey |
( |
U8 * |
dataPtr, |
|
|
U32 |
bufferSize |
|
) |
[inline] |
|
TNL::AsymmetricKey::AsymmetricKey |
( |
const ByteBuffer & |
theBuffer |
) |
[inline] |
|
TNL::AsymmetricKey::AsymmetricKey |
( |
BitStream * |
theStream |
) |
[inline] |
|
TNL::AsymmetricKey::AsymmetricKey |
( |
U32 |
keySize |
) |
|
|
|
Generates a new asymmetric key of keySize bytes.
|
Member Function Documentation
void TNL::AsymmetricKey::load |
( |
const ByteBuffer & |
theBuffer |
) |
[private] |
|
|
Load keypair from a buffer.
|
|
Returns a ByteBuffer containing an encoding of the public key.
|
|
Returns a ByteBuffer containing an encoding of the private key.
|
bool TNL::AsymmetricKey::hasPrivateKey |
( |
|
) |
[inline] |
|
bool TNL::AsymmetricKey::isValid |
( |
|
) |
[inline] |
|
|
Returns true if this is a valid key.
|
|
Compute a key we can share with the specified AsymmetricKey for a symmetric crypto.
|
U32 TNL::AsymmetricKey::getKeySize |
( |
|
) |
[inline] |
|
|
Constructs a digital signature for the specified buffer of bits.
This method only works for private keys. A public key only Asymmetric key will generate a signature of 0 bytes in length. |
bool TNL::AsymmetricKey::verifySignature |
( |
const ByteBuffer & |
theByteBuffer, |
|
|
const ByteBuffer & |
theSignature |
|
) |
|
|
|
Returns true if the private key associated with this AsymmetricKey signed theByteBuffer with theSignature.
|
Field Documentation
|
Raw key data.
The specific format of this buffer varies by cryptosystem, so look at the subclass to see how it's laid out. In general this is an opaque buffer. |
|
Size of the key at construct time.
|
|
Do we have the private key for this?
We may only have access to the public key (for instance, when validating a message signed by someone else). |
|
Buffer containing the public half of this keypair.
|
|
Buffer containing the private half of this keypair.
|