libDwmAuth-0.3.6
Dwm::Auth::PKCrypto Class Reference

Public key crypto utilities. More...

#include <DwmAuthPKCrypto.hh>

Classes

class  KeyPair
 Encapsulates a private/public key pair. More...
 
class  PrivateKey
 Encapsulates a readable and writable private key. More...
 
class  PublicKey
 Encapsulates a readable and writable public key. More...
 

Static Public Member Functions

static KeyPair CreateKeyPair (unsigned int keySize)
 Generate a private/public key pair. More...
 
static std::string Encrypt (const PublicKey &publicKey, const std::string &plainstr)
 Encrypts the given plainstr with the given publicKey and returns the encrypted string. More...
 
static std::string Decrypt (const PrivateKey &privateKey, const std::string &cipherstr)
 Decrypts the given cipherstr using the given privateKey and returns the decrypted string. More...
 

Detailed Description

Public key crypto utilities.

Member Function Documentation

◆ CreateKeyPair()

static KeyPair Dwm::Auth::PKCrypto::CreateKeyPair ( unsigned int  keySize)
static

Generate a private/public key pair.

The private key is the first key, the public key is the second key.

◆ Decrypt()

static std::string Dwm::Auth::PKCrypto::Decrypt ( const PrivateKey privateKey,
const std::string &  cipherstr 
)
static

Decrypts the given cipherstr using the given privateKey and returns the decrypted string.

◆ Encrypt()

static std::string Dwm::Auth::PKCrypto::Encrypt ( const PublicKey publicKey,
const std::string &  plainstr 
)
static

Encrypts the given plainstr with the given publicKey and returns the encrypted string.


The documentation for this class was generated from the following file: