UaPkiRsaKeyPair.
More...
#include <uapkirsakeypair.h>
UaPkiRsaKeyPair::UaPkiRsaKeyPair |
( |
| ) |
|
Constructs an empty keypair.
UaPkiRsaKeyPair::UaPkiRsaKeyPair |
( |
int |
bits | ) |
|
Constructs a key pair with given key size.
- Parameters
-
bits | RSA modulus (key size) which should be 1024, 2048, 3072 or 4096. |
Checks if a public key matches a private key.
- Returns
- True if the keys match, false otherwise.
UaPkiRsaKeyPair UaPkiRsaKeyPair::fromPEMFile |
( |
const char * |
szFileName, |
|
|
const char * |
szPassword, |
|
|
fcnPassword_callback * |
pCallback = 0 , |
|
|
void * |
pCBData = 0 |
|
) |
| |
|
static |
Loads a key pair from a PEM encoded file.
- Returns
- The new key pair. If the file could not be loaded the returned key pair will be empty. Use isValid() to check this.
- Parameters
-
[in] | szFileName | The filename locale 8bit encoded. |
[in] | szPassword | Specify the password of the PEM file, or 0 if the file is not protected. |
[in] | pCallback | A callback handle |
[in] | pCBData | The callback data passed to pCallback |
UaPkiRsaKeyPair UaPkiRsaKeyPair::fromPEMFile |
( |
const UaString & |
sFileName, |
|
|
const char * |
szPassword, |
|
|
fcnPassword_callback * |
pCallback = 0 , |
|
|
void * |
pCBData = 0 |
|
) |
| |
|
static |
Loads a key pair from a PEM encoded file.
- Returns
- The new key pair. If the file could not be loaded the returned key pair will be empty. Use isValid() to check this.
- Parameters
-
[in] | sFileName | The filename UTF8 encoded. |
[in] | szPassword | Specify the password of the PEM file, or 0 if the file is not protected. |
[in] | pCallback | A callback handle |
[in] | pCBData | The callback data passed to pCallback |
Returns the private key part of this key pair.
Returns the public key part of this key pair.
Converts the key pair to DER format.
- Returns
- DER encoded byte array.
UaByteArray UaPkiRsaKeyPair::toPEM |
( |
const char * |
szPassword | ) |
const |
Converts the key pair to PEM format.
- Returns
- PEM encoded byte array.
int UaPkiRsaKeyPair::toPEMFile |
( |
const char * |
szFileName, |
|
|
const char * |
szPassword |
|
) |
| const |
Stores the key pair into a PEM encoded file.
- Returns
- This functions returns zero on success.
- Parameters
-
[in] | szFileName | The filename locale 8bit encoded. |
[in] | szPassword | Specify a password to protect the PEM file, or 0 if the file should be unprotected. |
int UaPkiRsaKeyPair::toPEMFile |
( |
const UaString & |
sFileName, |
|
|
const char * |
szPassword |
|
) |
| const |
Stores the key pair into a PEM encoded file.
- Returns
- This functions returns zero on success.
- Parameters
-
[in] | sFileName | The filename UTF8 encoded. |
[in] | szPassword | Specify a password to protect the PEM file, or 0 if the file should be unprotected. |
The documentation for this class was generated from the following files:
- D:/work/uasdkcpp/src/uabase/uapkicpp/uapkirsakeypair.h
- D:/work/uasdkcpp/src/uabase/uapkicpp/uapkirsakeypair.cpp