Google APIs Client Library for C++
|
CodecFactory for creating and configuring OpenSslCodecs. More...
#include "client/data/openssl_codec.h"
Public Member Functions | |
OpenSslCodecFactory () | |
Standard constructor. | |
~OpenSslCodecFactory () | |
Standard destructor. | |
void | set_cipher_type (const EVP_CIPHER *type) |
Sets the cipher_type for new codecs. | |
void | set_md (EVP_MD *md) |
Sets the message digest algorithm for new codecs. | |
void | set_salt (const StringPiece &data) |
Sets the salt value to configure the algorithms with. | |
void | set_chunk_size (int chunk_size) |
Sets the chunk size to use when encoding/decoding. | |
util::Status | SetPassphrase (const StringPiece &passphrase) |
Computes the key and initialization vector from a passphrase. | |
virtual Codec * | New (util::Status *status) |
Constructs and configures a new codec instance. |
CodecFactory for creating and configuring OpenSslCodecs.
To configure creted ciphers, set the type, md, and aalt.
Standard constructor.
~OpenSslCodecFactory | ( | ) |
Standard destructor.
virtual Codec* New | ( | util::Status * | status | ) | [virtual] |
Constructs and configures a new codec instance.
[out] | status | ok or reason for failure. |
Implements CodecFactory.
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.
void set_cipher_type | ( | const EVP_CIPHER * | type | ) | [inline] |
Sets the cipher_type for new codecs.
This interface does not currently provide access to EVP_CIPHER_CTX_ctrl so RC5 and RC2 might not be viable options without further enhacement.
[in] | type | The OpenSsl cipher type. |
void set_md | ( | EVP_MD * | md | ) | [inline] |
Sets the message digest algorithm for new codecs.
[in] | md | The OpenSsl message digest algorithm. |
void set_salt | ( | const StringPiece & | data | ) | [inline] |
Sets the salt value to configure the algorithms with.
[in] | data | The salt value to use should be exactly 8 bytes. |
util::Status SetPassphrase | ( | const StringPiece & | passphrase | ) |
Computes the key and initialization vector from a passphrase.
[in] | passphrase | The passphrase to use. |