AWS SDK for C++  1.9.160
AWS SDK for C++
Public Member Functions | List of all members
Aws::Utils::Crypto::SymmetricCryptoBufSink Class Reference

#include <CryptoBuf.h>

+ Inheritance diagram for Aws::Utils::Crypto::SymmetricCryptoBufSink:

Public Member Functions

 SymmetricCryptoBufSink (Aws::OStream &stream, SymmetricCipher &cipher, CipherMode cipherMode, size_t bufferSize=DEFAULT_BUF_SIZE, int16_t blockOffset=0)
 
 SymmetricCryptoBufSink (const SymmetricCryptoBufSink &)=delete
 
 SymmetricCryptoBufSink (SymmetricCryptoBufSink &&)=delete
 
SymmetricCryptoBufSinkoperator= (const SymmetricCryptoBufSink &)=delete
 
SymmetricCryptoBufSinkoperator= (SymmetricCryptoBufSink &&)=delete
 
virtual ~SymmetricCryptoBufSink ()
 
void FinalizeCiphersAndFlushSink ()
 
void Finalize () override
 
- Public Member Functions inherited from Aws::Utils::Crypto::CryptoBuf
 CryptoBuf ()=default
 
virtual ~CryptoBuf ()=default
 
 CryptoBuf (const CryptoBuf &)=delete
 
 CryptoBuf (CryptoBuf &&rhs)=delete
 

Detailed Description

Stream buf that takes it's input, encrypts or decrypts it using the cipher, and writes it to the sink stream. This is particularly useful when receiving an encrypted file over the internet and writing it decrypted to disk. Another case may be that you have an ofstream and you want to write text to it from your program but have it go encrypted to disk.

This stream buf is not seekable.

Definition at line 105 of file CryptoBuf.h.

Constructor & Destructor Documentation

◆ SymmetricCryptoBufSink() [1/3]

Aws::Utils::Crypto::SymmetricCryptoBufSink::SymmetricCryptoBufSink ( Aws::OStream stream,
SymmetricCipher cipher,
CipherMode  cipherMode,
size_t  bufferSize = DEFAULT_BUF_SIZE,
int16_t  blockOffset = 0 
)

stream, sink to push the encrypted or decrypted data to. cipher, symmetric cipher to use to transform the input before sending it to the sink. cipherMode, encrypt or decrypt bufferSize, amount of data to encrypt/decrypt at a time.

◆ SymmetricCryptoBufSink() [2/3]

Aws::Utils::Crypto::SymmetricCryptoBufSink::SymmetricCryptoBufSink ( const SymmetricCryptoBufSink )
delete

◆ SymmetricCryptoBufSink() [3/3]

Aws::Utils::Crypto::SymmetricCryptoBufSink::SymmetricCryptoBufSink ( SymmetricCryptoBufSink &&  )
delete

◆ ~SymmetricCryptoBufSink()

virtual Aws::Utils::Crypto::SymmetricCryptoBufSink::~SymmetricCryptoBufSink ( )
virtual

Member Function Documentation

◆ Finalize()

void Aws::Utils::Crypto::SymmetricCryptoBufSink::Finalize ( )
inlineoverridevirtual

Simply calls FinalizeCiphersAndFlushSink()

Reimplemented from Aws::Utils::Crypto::CryptoBuf.

Definition at line 133 of file CryptoBuf.h.

◆ FinalizeCiphersAndFlushSink()

void Aws::Utils::Crypto::SymmetricCryptoBufSink::FinalizeCiphersAndFlushSink ( )

Finalizes the cipher and pushes all remaining data to the sink. Once this has been called, this streambuf cannot be used any further.

◆ operator=() [1/2]

SymmetricCryptoBufSink& Aws::Utils::Crypto::SymmetricCryptoBufSink::operator= ( const SymmetricCryptoBufSink )
delete

◆ operator=() [2/2]

SymmetricCryptoBufSink& Aws::Utils::Crypto::SymmetricCryptoBufSink::operator= ( SymmetricCryptoBufSink &&  )
delete

Not move assignable since it contains reference members


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