UaPkiRsaKeyPair Class Reference
[PKI Library Classes]

#include <uapkirsakeypair.h>

List of all members.


Public Member Functions

 UaPkiRsaKeyPair ()
 UaPkiRsaKeyPair (int bits)
 ~UaPkiRsaKeyPair ()
 UaPkiRsaKeyPair (const UaPkiRsaKeyPair &copy)
UaPkiPrivateKey privateKey () const
UaPkiPublicKey publicKey () const
int toPEMFile (const char *szFileName, const char *szPassword) const
UaByteArray toDER () const

Static Public Member Functions

static UaPkiRsaKeyPair fromPEMFile (const char *szFileName, const char *szPassword, fcnPassword_callback *pCallback=0, void *pCBData=0)

Detailed Description

UaPkiRsaKeyPair

Constructor & Destructor Documentation

UaPkiRsaKeyPair::UaPkiRsaKeyPair (  ) 

Constructs an empty keypair.

UaPkiRsaKeyPair::UaPkiRsaKeyPair ( int  bits  ) 

Constructs a keypair with given key size.

Parameters:
bits RSA modulus (key size) which should be 1024, 2048 or 4096.

UaPkiRsaKeyPair::~UaPkiRsaKeyPair (  ) 

destruction

UaPkiRsaKeyPair::UaPkiRsaKeyPair ( const UaPkiRsaKeyPair copy  ) 

construction

Parameters:
copy an exisitng UaPkiRsaKeyPair structure.


Member Function Documentation

UaPkiPrivateKey UaPkiRsaKeyPair::privateKey (  )  const

Returns the private key part of this key pair.

UaPkiPublicKey UaPkiRsaKeyPair::publicKey (  )  const

Returns the public key part of this key pair.

int UaPkiRsaKeyPair::toPEMFile ( const char *  szFileName,
const char *  szPassword 
) const

Stores the keypair into a PEM encoded file.

Parameters:
szFileName The filename locale 8bit encoded.
szPassword Specify a password to protect the PEM file, or 0 if the file should be unprotected.
Returns:
This functions returns zero on success.

UaByteArray UaPkiRsaKeyPair::toDER (  )  const

Converts the key pair to DER format.

Returns:
DER encoded byte array.

UaPkiRsaKeyPair UaPkiRsaKeyPair::fromPEMFile ( const char *  szFileName,
const char *  szPassword,
fcnPassword_callback *  pCallback = 0,
void *  pCBData = 0 
) [static]

Loads a keypair from a PEM encoded file.

Parameters:
szFileName The filename locale 8bit encoded.
szPassword Specify the password of the PEM file, or 0 if the file is not protected.
pCBData ToDoDoc
pCallback ToDoDoc
Returns:
The new key pair. If the file could not be loaded the returnd keypair will be empty. Use isValid() to check this.


The documentation for this class was generated from the following files:
  • src/uabase/uapkicpp/uapkirsakeypair.h
  • src/uabase/uapkicpp/uapkirsakeypair.cpp