Fabcoin Core  0.16.2
P2P Digital Currency
Public Member Functions | List of all members
TF_EncryptorBase Class Reference

#include <pubkey.h>

Inheritance diagram for TF_EncryptorBase:
[legend]
Collaboration diagram for TF_EncryptorBase:
[legend]

Public Member Functions

virtual ~TF_EncryptorBase ()
 
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 > >
virtual ~TF_CryptoSystemBase ()
 
bool ParameterSupported (const char *name) const
 
size_t FixedMaxPlaintextLength () const
 
size_t FixedCiphertextLength () const
 
- Public Member Functions inherited from PK_FixedLengthCryptoSystemImpl< PK_Encryptor >
virtual ~PK_FixedLengthCryptoSystemImpl ()
 
size_t MaxPlaintextLength (size_t ciphertextLength) const
 
size_t CiphertextLength (size_t plaintextLength) const
 
- Public Member Functions inherited from PK_Encryptor
virtual BufferedTransformationCreateEncryptionFilter (RandomNumberGenerator &rng, BufferedTransformation *attachment=NULL, const NameValuePairs &parameters=g_nullNameValuePairs) const
 Create a new encryption filter. More...
 
- Public Member Functions inherited from PK_CryptoSystem
virtual ~PK_CryptoSystem ()
 
- Public Member Functions inherited from PublicKeyAlgorithm
virtual ~PublicKeyAlgorithm ()
 
CryptoMaterialAccessMaterial ()
 Retrieves a reference to a Public Key. More...
 
const CryptoMaterialGetMaterial () const
 Retrieves a reference to a Public Key. More...
 
virtual PublicKeyAccessPublicKey ()=0
 Retrieves a reference to a Public Key. More...
 
virtual const PublicKeyGetPublicKey () const
 Retrieves a reference to a Public Key. More...
 
- Public Member Functions inherited from AsymmetricAlgorithm
virtual ~AsymmetricAlgorithm ()
 
void BERDecode (BufferedTransformation &bt)
 Loads this object from a BufferedTransformation. More...
 
void DEREncode (BufferedTransformation &bt) const
 Saves this object to a BufferedTransformation. More...
 
- Public Member Functions inherited from Algorithm
virtual ~Algorithm ()
 
 Algorithm (bool checkSelfTestStatus=true)
 Interface for all crypto algorithms. More...
 
virtual std::string AlgorithmName () const
 Provides the name of this algorithm. More...
 
- Public Member Functions inherited from Clonable
virtual ~Clonable ()
 
virtual ClonableClone () const
 Copies this object. More...
 

Additional Inherited Members

- Protected Types inherited from TF_Base< RandomizedTrapdoorFunction, PK_EncryptionMessageEncodingMethod >
typedef RandomizedTrapdoorFunction TrapdoorFunctionInterface
 
typedef PK_EncryptionMessageEncodingMethod MessageEncodingInterface
 
- Protected Member Functions inherited from TF_CryptoSystemBase< PK_Encryptor, TF_Base< RandomizedTrapdoorFunction, PK_EncryptionMessageEncodingMethod > >
size_t PaddedBlockByteLength () const
 
size_t PaddedBlockBitLength () const
 
- Protected Member Functions inherited from TF_Base< RandomizedTrapdoorFunction, PK_EncryptionMessageEncodingMethod >
virtual ~TF_Base ()
 
virtual const TrapdoorFunctionBoundsGetTrapdoorFunctionBounds () const =0
 
virtual const TrapdoorFunctionInterfaceGetTrapdoorFunctionInterface () const =0
 
virtual const MessageEncodingInterfaceGetMessageEncodingInterface () const =0
 

Detailed Description

Definition at line 303 of file pubkey.h.

Constructor & Destructor Documentation

virtual TF_EncryptorBase::~TF_EncryptorBase ( )
inlinevirtual

Definition at line 306 of file pubkey.h.

Member Function Documentation

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
rnga RandomNumberGenerator derived class
plaintextthe plaintext byte buffer
plaintextLengththe size of the plaintext byte buffer
ciphertexta byte buffer to hold the encrypted string
parametersa 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.

Here is the call graph for this function:


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