Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Unified Diff: components/webcrypto/status.cc

Issue 2837383002: Raise an error when calling WebCrypto's deriveBits() for HKDF with (Closed)
Patch Set: checkpoint Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/webcrypto/status.h ('k') | third_party/WebKit/LayoutTests/crypto/subtle/hkdf/deriveBits.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/webcrypto/status.cc
diff --git a/components/webcrypto/status.cc b/components/webcrypto/status.cc
index 7dcbb93c8884d60b6771c10a94c793cc714cf503..3645279c7ec51e1f76a443f53684945335b9b0aa 100644
--- a/components/webcrypto/status.cc
+++ b/components/webcrypto/status.cc
@@ -331,6 +331,11 @@ Status Status::ErrorHkdfLengthTooLong() {
"The length provided for HKDF is too large.");
}
+Status Status::ErrorHkdfLengthNotWholeByte() {
+ return Status(blink::kWebCryptoErrorTypeOperation,
+ "The length provided for HKDF is not a multiple of 8 bits.");
+}
+
Status Status::ErrorHkdfDeriveBitsLengthNotSpecified() {
// TODO(nharper): The spec might change so that an OperationError should be
// thrown here instead of a TypeError.
« no previous file with comments | « components/webcrypto/status.h ('k') | third_party/WebKit/LayoutTests/crypto/subtle/hkdf/deriveBits.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698