Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
PKey Class Reference

#include <PK.H>

Public Member Functions

 PKey (void)
 
 PKey (void const *exponent, void const *modulus)
 
int Encrypt (void const *source, int slen, void *dest) const
 
int Decrypt (void const *source, int slen, void *dest) const
 
int Plain_Block_Size (void) const
 
int Crypt_Block_Size (void) const
 
int Block_Count (int plaintext_length) const
 
int Encode_Modulus (void *buffer) const
 
int Encode_Exponent (void *buffer) const
 
void Decode_Modulus (void *buffer)
 
void Decode_Exponent (void *buffer)
 

Static Public Member Functions

static void Generate (Straw &random, int bits, PKey &fastkey, PKey &slowkey)
 
static long Fast_Exponent (void)
 

Public Attributes

BigInt Modulus
 
BigInt Exponent
 
int BitPrecision
 

Detailed Description

Definition at line 62 of file PK.H.

Constructor & Destructor Documentation

◆ PKey() [1/2]

PKey::PKey ( void )
inline

Definition at line 65 of file PK.H.

◆ PKey() [2/2]

PKey::PKey ( void const * exponent,
void const * modulus )

Definition at line 76 of file pk.cpp.

Member Function Documentation

◆ Block_Count()

int PKey::Block_Count ( int plaintext_length) const
inline

Definition at line 75 of file PK.H.

◆ Crypt_Block_Size()

int PKey::Crypt_Block_Size ( void ) const
inline

Definition at line 74 of file PK.H.

◆ Decode_Exponent()

void PKey::Decode_Exponent ( void * buffer)

Definition at line 171 of file pk.cpp.

◆ Decode_Modulus()

void PKey::Decode_Modulus ( void * buffer)

Definition at line 149 of file pk.cpp.

◆ Decrypt()

int PKey::Decrypt ( void const * source,
int slen,
void * dest ) const

Definition at line 340 of file pk.cpp.

◆ Encode_Exponent()

int PKey::Encode_Exponent ( void * buffer) const

Definition at line 125 of file pk.cpp.

◆ Encode_Modulus()

int PKey::Encode_Modulus ( void * buffer) const

Definition at line 100 of file pk.cpp.

◆ Encrypt()

int PKey::Encrypt ( void const * source,
int slen,
void * dest ) const

Definition at line 288 of file pk.cpp.

◆ Fast_Exponent()

static long PKey::Fast_Exponent ( void )
inlinestatic

Definition at line 83 of file PK.H.

◆ Generate()

void PKey::Generate ( Straw & random,
int bits,
PKey & fastkey,
PKey & slowkey )
static

Definition at line 205 of file pk.cpp.

◆ Plain_Block_Size()

int PKey::Plain_Block_Size ( void ) const
inline

Definition at line 73 of file PK.H.

Member Data Documentation

◆ BitPrecision

int PKey::BitPrecision

Definition at line 95 of file PK.H.

◆ Exponent

BigInt PKey::Exponent

Definition at line 92 of file PK.H.

◆ Modulus

BigInt PKey::Modulus

Definition at line 88 of file PK.H.


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