RLib  5.7
RLib - an opensource, lightweight and multi-platform framework for cpp programming
System::Security::Cryptography::RSAKeyPair Class Reference

A suite of routines for performing RSA public-key computations. http://www.ohdave.com/rsa/RSA.js More...

Public Member Functions

 RSAKeyPair (const char *encryptionExponent, const char *decryptionExponent, const char *modulus)
 RSAKeyPair initiation More...
 
bool Encrypt (const void *input, void *output)
 Do an RSA public key operation. The input and output buffers must be large enough(eg. 128 bytes if RSA - 1024 is used). This function does NOT take care of message padding. Also, be sure to set input[0] = 0 or assure that input is smaller than N More...
 
bool EncryptJS (const void *input, size_t size, void *temp, void *output)
 Do an RSA public key operation. The temp and output buffers must be large enough(eg. 128 bytes if RSA - 1024 is used). This routine first pads the plaintext text to the same length as the encryption key for proper encryption. More...
 
size_t GetKeySize ()
 size(N) in chars More...
 
 RLIB_PROPERTY_GET (size_t KeySize, GetKeySize)
 

Public Attributes

 RLIB_DECLARE_DYNCREATE
 

Detailed Description

A suite of routines for performing RSA public-key computations. http://www.ohdave.com/rsa/RSA.js

Constructor & Destructor Documentation

RSAKeyPair::RSAKeyPair ( const char *  encryptionExponent,
const char *  decryptionExponent,
const char *  modulus 
)

RSAKeyPair initiation

Parameters
encryptionExponentpublic exponent
decryptionExponentprivate exponent
moduluspublic modulus

Member Function Documentation

bool RSAKeyPair::Encrypt ( const void *  input,
void *  output 
)

Do an RSA public key operation. The input and output buffers must be large enough(eg. 128 bytes if RSA - 1024 is used). This function does NOT take care of message padding. Also, be sure to set input[0] = 0 or assure that input is smaller than N

Parameters
inputinput buffer
outputoutput buffer
bool RSAKeyPair::EncryptJS ( const void *  input,
size_t  size,
void *  temp,
void *  output 
)

Do an RSA public key operation. The temp and output buffers must be large enough(eg. 128 bytes if RSA - 1024 is used). This routine first pads the plaintext text to the same length as the encryption key for proper encryption.

Parameters
inputinput buffer
sizesize of input buffer
temptemp buffer used to save padded data
outputoutput buffer
size_t RSAKeyPair::GetKeySize ( )

size(N) in chars


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