aboutsummaryrefslogtreecommitdiff
path: root/cc/mac/hmac_key_manager.h
diff options
context:
space:
mode:
authorBartosz Przydatek <przydatek@google.com>2017-05-24 16:01:20 +0200
committerThai Duong <thaidn@google.com>2017-06-01 09:20:37 -0700
commit12c2c180f5fda5480eac55b07ad2a242aab9fc67 (patch)
tree8b61cd8999eefac29424a085776bccdfd328aaf9 /cc/mac/hmac_key_manager.h
parentc041271355321f25cd577ddf0185941420267ef6 (diff)
downloadtink-12c2c180f5fda5480eac55b07ad2a242aab9fc67.tar.gz
Adding C++ ECIES-AEAD-HKDF hybrid encryption.
Change-Id: Iaf3e6bd2615273618a5f5c9dd1527aab47e659de ORIGINAL_AUTHOR=Bartosz Przydatek <przydatek@google.com> GitOrigin-RevId: b8386a7057ea9586aa332424ecea4d22fd7114d8
Diffstat (limited to 'cc/mac/hmac_key_manager.h')
-rw-r--r--cc/mac/hmac_key_manager.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/cc/mac/hmac_key_manager.h b/cc/mac/hmac_key_manager.h
index a923ff6c3..86033b909 100644
--- a/cc/mac/hmac_key_manager.h
+++ b/cc/mac/hmac_key_manager.h
@@ -36,15 +36,18 @@ class HmacKeyManager : public KeyManager<Mac> {
public:
HmacKeyManager() : key_type_(kKeyType) {}
- // Constructs an instance of HMAC-Mac for the given 'key'.
+ // Constructs an instance of HMAC-Mac for the given 'key_data',
+ // which must contain HmacKey-proto.
util::StatusOr<std::unique_ptr<Mac>> GetPrimitive(
const google::crypto::tink::KeyData& key_data) const override;
- // Constructs an instance of HMAC-Mac for the given 'key'.
+ // Constructs an instance of HMAC-Mac for the given 'key',
+ // which must be HmacKey-proto.
util::StatusOr<std::unique_ptr<Mac>>
GetPrimitive(const google::protobuf::Message& key) const override;
- // Generates a new random HMAC key, based on the specified 'key_template'.
+ // Generates a new random HmacKey, based on the specified 'key_template',
+ // which must contain HmacKeyFormat-proto.
util::StatusOr<std::unique_ptr<google::protobuf::Message>> NewKey(
const google::crypto::tink::KeyTemplate& key_template)
const override;