Crypto++ 7.0 Free C++ class library of cryptographic schemes

Public Member Functions | List of all members
TF_EncryptorBase Class Reference

Trapdoor function cryptosystems encryption base class. More...

Inheritance diagram for TF_EncryptorBase:

## Public Member Functions
void | Encrypt (RandomNumberGenerator &rng, const byte *plaintext, size_t plaintextLength, byte *ciphertext, const NameValuePairs &parameters=g_nullNameValuePairs) const
| Encrypt a byte string. More...
Public Member Functions inherited from TF_CryptoSystemBase< PK_Encryptor, TF_Base< RandomizedTrapdoorFunction, PK_EncryptionMessageEncodingMethod > >
bool | ParameterSupported (const char *name) const
size_t | FixedMaxPlaintextLength () const
size_t | FixedCiphertextLength () const
Public Member Functions inherited from PK_FixedLengthCryptoSystemImpl< PK_Encryptor >
size_t | MaxPlaintextLength (size_t ciphertextLength) const
size_t | CiphertextLength (size_t plaintextLength) const
Public Member Functions inherited from PK_Encryptor
virtual BufferedTransformation * | CreateEncryptionFilter (RandomNumberGenerator &rng, BufferedTransformation *attachment=NULL, const NameValuePairs &parameters=g_nullNameValuePairs) const
| Create a new encryption filter. More...
Public Member Functions inherited from PublicKeyAlgorithm
CryptoMaterial & | AccessMaterial ()
| Retrieves a reference to a Public Key. More...
const CryptoMaterial & | GetMaterial () const
| Retrieves a reference to a Public Key. More...
virtual PublicKey & | AccessPublicKey ()=0
| Retrieves a reference to a Public Key. More...
virtual const PublicKey & | GetPublicKey () const
| Retrieves a reference to a Public Key. More...
Public Member Functions inherited from Algorithm
| Algorithm (bool checkSelfTestStatus=true)
| Interface for all crypto algorithms. More...
virtual std::string | AlgorithmName () const
| Provides the name of this algorithm. More...
virtual std::string | AlgorithmProvider () const
| Retrieve the provider of this algorithm. More...
Public Member Functions inherited from Clonable
virtual Clonable * | Clone () const
| Copies this object. More...

## Detailed Description

Trapdoor function cryptosystems encryption base class.

Definition at line 292 of file pubkey.h.

## Member Function Documentation

## ◆ Encrypt()

void TF_EncryptorBase::Encrypt | ( | RandomNumberGenerator & | rng,
|  | const byte * | plaintext,
|  | size_t | plaintextLength,
|  | byte * | ciphertext,
|  | const NameValuePairs & | parameters = `g_nullNameValuePairs`
| ) |  | const
| virtual

Encrypt a byte string.

Parameters

  rng | a RandomNumberGenerator derived class
  plaintext | the plaintext byte buffer
  plaintextLength | the size of the plaintext byte buffer
  ciphertext | a byte buffer to hold the encrypted string
  parameters | a set of NameValuePairs to initialize this object

Precondition
  `CiphertextLength(plaintextLength) != 0` ensures the plaintext isn't too large
  `COUNTOF(ciphertext) == CiphertextLength(plaintextLength)` ensures the output byte buffer is large enough.

See also
  PK_Decryptor

Implements PK_Encryptor.

Definition at line 153 of file pubkey.cpp.

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

- pubkey.h
- pubkey.cpp