diff options
author | albertb@chromium.org <albertb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-31 16:18:30 +0000 |
---|---|---|
committer | albertb@chromium.org <albertb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-31 16:18:30 +0000 |
commit | 1b47ce2e8d25023f531f4afa8f05b044c4cef111 (patch) | |
tree | 7b4875711b3b1aea46b06ad0d2bb84194d0301c7 /base/crypto/encryptor.h | |
parent | 61ee6287a14aed0235a40488394fb700e9c5c43c (diff) | |
download | chromium_src-1b47ce2e8d25023f531f4afa8f05b044c4cef111.zip chromium_src-1b47ce2e8d25023f531f4afa8f05b044c4cef111.tar.gz chromium_src-1b47ce2e8d25023f531f4afa8f05b044c4cef111.tar.bz2 |
First pass of a Nigori implementation for Chrome. Only unassisted key
derivation is supported and there is no support for server authentication.
BUG=37363
TEST=unit tests
Review URL: http://codereview.chromium.org/1357003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43220 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/crypto/encryptor.h')
-rw-r--r-- | base/crypto/encryptor.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/base/crypto/encryptor.h b/base/crypto/encryptor.h index a09c7cd..96a6d6a 100644 --- a/base/crypto/encryptor.h +++ b/base/crypto/encryptor.h @@ -17,12 +17,11 @@ class Encryptor { enum Mode { CBC }; - explicit Encryptor(); - ~Encryptor(); + Encryptor(); + virtual ~Encryptor(); - // Initializes the encryptor using |key| and |iv|. Takes ownership of |key| if - // successful. Returns false if either the key or the initialization vector - // cannot be used. + // Initializes the encryptor using |key| and |iv|. Returns false if either the + // key or the initialization vector cannot be used. bool Init(SymmetricKey* key, Mode mode, const std::string& iv); // Encrypts |plaintext| into |ciphertext|. @@ -34,8 +33,8 @@ class Encryptor { // TODO(albertb): Support streaming encryption. private: + SymmetricKey* key_; Mode mode_; - scoped_ptr<SymmetricKey> key_; #if defined(USE_NSS) ScopedPK11Slot slot_; |