Skip to content

PKIC

Overview

Public Key Infrastructure Container (PKIC) is a container for both private and public key.
Various methods of loading, generating and exporting the Keys are available.
PKIC keys are a raw cryptographic keys and do not hold any additional information like, subject etc...


Constructor

Constructs a blank un-initialized instance of PKIC, which holds no keys.

RSA::pkic()

  • Parameters:

Binary loaders

Load the RSA keys from DER binary format data buffer into PKIC.

RSA::pkic::loadPrivDER(dutils::dbuffer& DER)

  • Parameters:
    • dutils::dbuffer& DER - Private key data buffer in with DER format

RSA::pkic::loadPubDER(dutils::dbuffer& DER)

  • Parameters:
    • dutils::dbuffer& DER - Public key data buffer in with DER format



PEM loaders

Load the RSA keys from PEM format string into PKIC.

RSA::pkic::loadPEMStr()

  • Parameters: const char* PEM - PEM string to load

RSA::pkic::importPEM()

  • Parameters: const char* file - Path to file to load PEM string from



DER getters

Return the RSA keys in DER binary format.

RSA::pkic::getPrivDER()

  • Parameters:
  • Returns:
    • dutils::dbuffer& DER - Private key DER data buffer

RSA::pkic::getPubDER()

  • Parameters:
  • Returns:
    • dutils::dbuffer& DER - Public key DER data buffer



PEM string getters

Return the RSA keys in PEM string format.

RSA::pkic::getPrivPEM()

  • Parameters:
  • Returns:
    • std::string private key in form of PEM string

RSA::pkic::getPubPEM()

  • Parameters:
  • Returns:
    • std::string public key in form of PEM string

RSA::pkic::getBundlePEM()

  • Parameters:
  • Returns:
    • std::string fullkey key in form of PEM string