Google APIs Client Library for C++
|
Provdes a codec for encrypting and decrypting reader streams using OpenSSL. More...
#include "client/data/openssl_codec.h"
Public Member Functions | |
OpenSslCodec () | |
Standard constructor. | |
virtual | ~OpenSslCodec () |
Standard destructor. | |
void | set_chunk_size (int chunk_size) |
Sets the chunk size to use when encoding/decoding. | |
util::Status | Init (const EVP_CIPHER *cipher_type, const string &key, const string &iv) |
Initializes with the cipher type, key, and initialization vector. | |
virtual DataReader * | NewManagedEncodingReader (DataReader *reader, Closure *deleter, util::Status *status) |
Returns a reader that will encode another reader using this codec. | |
virtual DataReader * | NewManagedDecodingReader (DataReader *reader, Closure *deleter, util::Status *status) |
Returns a reader that will decode another reader using this codec. |
Provdes a codec for encrypting and decrypting reader streams using OpenSSL.
OpenSslCodec | ( | ) |
Standard constructor.
virtual ~OpenSslCodec | ( | ) | [virtual] |
Standard destructor.
util::Status Init | ( | const EVP_CIPHER * | cipher_type, |
const string & | key, | ||
const string & | iv | ||
) |
Initializes with the cipher type, key, and initialization vector.
[in] | cipher_type | OpenSsl cipher type. |
[in] | key | The cipher key. |
[in] | iv | The cipher initialization vector. |
virtual DataReader* NewManagedDecodingReader | ( | DataReader * | reader, |
Closure * | deleter, | ||
util::Status * | status | ||
) | [virtual] |
Returns a reader that will decode another reader using this codec.
[in] | reader | The caller maintain ownership. |
[in] | deleter | The managed deleter may be used to delete the reader. NULL indicates an unmanaged reader. |
[out] | status | Will indicate ok or reason for failure. |
Implements Codec.
virtual DataReader* NewManagedEncodingReader | ( | DataReader * | reader, |
Closure * | deleter, | ||
util::Status * | status | ||
) | [virtual] |
Returns a reader that will encode another reader using this codec.
[in] | reader | The caller maintain ownership. |
[in] | deleter | The managed deleter may be used to delete the reader. NULL indicates an unmanaged reader. |
[out] | status | Will indicate ok or reason for failure. |
Implements Codec.
void set_chunk_size | ( | int | chunk_size | ) | [inline] |
Sets the chunk size to use when encoding/decoding.
[in] | chunk_size | Must be > 0 and should be a multiple of the cipher block size. |
There is probably no need for changing this, but helps testing.