7#include <aws/core/utils/crypto/Cipher.h>
8#include <aws/core/Core_EXPORTS.h>
33 class AWS_CORE_API
CryptoBuf :
public std::streambuf
81 pos_type
seekoff(off_type off, std::ios_base::seekdir dir, std::ios_base::openmode which = std::ios_base::in | std::ios_base::out )
override;
82 pos_type
seekpos(pos_type pos, std::ios_base::openmode which = std::ios_base::in | std::ios_base::out )
override;
85 int_type underflow()
override;
86 off_type ComputeAbsSeekPosition(off_type, std::ios_base::seekdir, std::fpos<FPOS_TYPE>);
87 void FinalizeCipher();
133 void Finalize()
override { FinalizeCiphersAndFlushSink(); }
136 int_type overflow(int_type ch)
override;
138 bool writeOutput(
bool finalize);
145 int16_t m_blockOffset;
CryptoBuf(const CryptoBuf &)=delete
CryptoBuf(CryptoBuf &&rhs)=delete
virtual ~CryptoBuf()=default
void FinalizeCiphersAndFlushSink()
SymmetricCryptoBufSink(Aws::OStream &stream, SymmetricCipher &cipher, CipherMode cipherMode, size_t bufferSize=DEFAULT_BUF_SIZE, int16_t blockOffset=0)
SymmetricCryptoBufSink(const SymmetricCryptoBufSink &)=delete
SymmetricCryptoBufSink & operator=(SymmetricCryptoBufSink &&)=delete
SymmetricCryptoBufSink(SymmetricCryptoBufSink &&)=delete
SymmetricCryptoBufSink & operator=(const SymmetricCryptoBufSink &)=delete
virtual ~SymmetricCryptoBufSink()
virtual ~SymmetricCryptoBufSrc()
SymmetricCryptoBufSrc & operator=(const SymmetricCryptoBufSrc &)=delete
SymmetricCryptoBufSrc(Aws::IStream &stream, SymmetricCipher &cipher, CipherMode cipherMode, size_t bufferSize=DEFAULT_BUF_SIZE)
pos_type seekoff(off_type off, std::ios_base::seekdir dir, std::ios_base::openmode which=std::ios_base::in|std::ios_base::out) override
pos_type seekpos(pos_type pos, std::ios_base::openmode which=std::ios_base::in|std::ios_base::out) override
SymmetricCryptoBufSrc(const SymmetricCryptoBufSrc &)=delete
SymmetricCryptoBufSrc & operator=(SymmetricCryptoBufSrc &&)=delete
SymmetricCryptoBufSrc(SymmetricCryptoBufSrc &&)=delete
static const size_t PUT_BACK_SIZE
static const size_t DEFAULT_BUF_SIZE
std::basic_istream< char, std::char_traits< char > > IStream
std::basic_ostream< char, std::char_traits< char > > OStream