aboutsummaryrefslogtreecommitdiff
path: root/cc/mac/hmac_key_manager.h
diff options
context:
space:
mode:
authorwiktorg <wiktorg@google.com>2020-03-02 03:50:25 -0800
committerCopybara-Service <copybara-worker@google.com>2020-03-02 03:50:58 -0800
commiteef8f9cd34fb996684d0c51deecd19a8876fcb63 (patch)
tree3c173a73809366787618a4f06199c5656f251b12 /cc/mac/hmac_key_manager.h
parent92e35f0f40a48c8c583773e2b21d3b3fc61b5203 (diff)
downloadtink-eef8f9cd34fb996684d0c51deecd19a8876fcb63.tar.gz
Use sanitizing containers in hmac_boringssl
PiperOrigin-RevId: 298317462
Diffstat (limited to 'cc/mac/hmac_key_manager.h')
-rw-r--r--cc/mac/hmac_key_manager.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/cc/mac/hmac_key_manager.h b/cc/mac/hmac_key_manager.h
index 7be023e6d..03ccdb934 100644
--- a/cc/mac/hmac_key_manager.h
+++ b/cc/mac/hmac_key_manager.h
@@ -27,6 +27,7 @@
#include "tink/util/enums.h"
#include "tink/util/errors.h"
#include "tink/util/protobuf_helper.h"
+#include "tink/util/secret_data.h"
#include "tink/util/status.h"
#include "tink/util/statusor.h"
#include "proto/hmac.pb.h"
@@ -44,7 +45,8 @@ class HmacKeyManager
const google::crypto::tink::HmacKey& hmac_key) const override {
return subtle::HmacBoringSsl::New(
util::Enums::ProtoToSubtle(hmac_key.params().hash()),
- hmac_key.params().tag_size(), hmac_key.key_value());
+ hmac_key.params().tag_size(),
+ util::SecretDataFromStringView(hmac_key.key_value()));
}
};