summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorjoth@chromium.org <joth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-16 12:28:51 +0000
committerjoth@chromium.org <joth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-16 12:28:51 +0000
commit03d8698ff7cfe3ff42a5a52c5820ae24e0bf0a2f (patch)
treeaeb3159bf77f3b6bcd7a048325f77b6ab51d6972 /base
parent233a79a45d46c0034d307d37efd8b0caa1b206c3 (diff)
downloadchromium_src-03d8698ff7cfe3ff42a5a52c5820ae24e0bf0a2f.zip
chromium_src-03d8698ff7cfe3ff42a5a52c5820ae24e0bf0a2f.tar.gz
chromium_src-03d8698ff7cfe3ff42a5a52c5820ae24e0bf0a2f.tar.bz2
Clarify some documentation on SymmetricKey
BUG=None TEST=None Review URL: http://codereview.chromium.org/5013001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66259 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r--base/crypto/symmetric_key.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/base/crypto/symmetric_key.h b/base/crypto/symmetric_key.h
index 1038728..6ad0646 100644
--- a/base/crypto/symmetric_key.h
+++ b/base/crypto/symmetric_key.h
@@ -24,6 +24,8 @@ namespace base {
// scoped_ptr.
class SymmetricKey {
public:
+ // Defines the algorithm that a key will be used with. See also
+ // classs Encrptor.
enum Algorithm {
AES,
HMAC_SHA1,
@@ -31,14 +33,16 @@ class SymmetricKey {
virtual ~SymmetricKey();
- // Generates a random key suitable to be used with |cipher| and of
+ // Generates a random key suitable to be used with |algorithm| and of
// |key_size_in_bits| bits.
// The caller is responsible for deleting the returned SymmetricKey.
static SymmetricKey* GenerateRandomKey(Algorithm algorithm,
size_t key_size_in_bits);
- // Derives a key from the supplied password and salt using PBKDF2. The caller
- // is responsible for deleting the returned SymmetricKey.
+ // Derives a key from the supplied password and salt using PBKDF2, suitable
+ // for use with specified |algorithm|. Note |algorithm| is not the algorithm
+ // used to derive the key from the password. The caller is responsible for
+ // deleting the returned SymmetricKey.
static SymmetricKey* DeriveKeyFromPassword(Algorithm algorithm,
const std::string& password,
const std::string& salt,