summaryrefslogtreecommitdiffstats
path: root/crypto/hmac.h
diff options
context:
space:
mode:
authorgspencer@chromium.org <gspencer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-11 23:17:14 +0000
committergspencer@chromium.org <gspencer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-11 23:17:14 +0000
commit2c9f0def901b383bb003c4d10c198cabec1277f6 (patch)
treeb151b0f99cf928e3aaf4eeddf39a98bf301313db /crypto/hmac.h
parent98a4a4fedccd40287db03233947f48c02906b74d (diff)
downloadchromium_src-2c9f0def901b383bb003c4d10c198cabec1277f6.zip
chromium_src-2c9f0def901b383bb003c4d10c198cabec1277f6.tar.gz
chromium_src-2c9f0def901b383bb003c4d10c198cabec1277f6.tar.bz2
This adds support for encrypted ONC import to Chrome.
We now can import standalone ONC files that are encrypted by the Spigots management app. TBR=joaodasilva@chromium.org BUG=chromium-os:19397 TEST=Ran new unit tests, imported encrypted ONC on device. Review URL: http://codereview.chromium.org/8949056 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117321 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'crypto/hmac.h')
-rw-r--r--crypto/hmac.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/crypto/hmac.h b/crypto/hmac.h
index b170ce7..2e22a15 100644
--- a/crypto/hmac.h
+++ b/crypto/hmac.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -19,6 +19,7 @@ namespace crypto {
// Simplify the interface and reduce includes by abstracting out the internals.
struct HMACPlatformData;
+class SymmetricKey;
class CRYPTO_EXPORT HMAC {
public:
@@ -41,6 +42,10 @@ class CRYPTO_EXPORT HMAC {
// TODO(abarth): key_length should be a size_t.
bool Init(const unsigned char* key, int key_length) WARN_UNUSED_RESULT;
+ // Initializes this instance using |key|. Call Init
+ // only once. It returns false on the second or later calls.
+ bool Init(SymmetricKey* key) WARN_UNUSED_RESULT;
+
// Initializes this instance using |key|. Call Init only once. It returns
// false on the second or later calls.
bool Init(const base::StringPiece& key) WARN_UNUSED_RESULT {