Index: content/renderer/webcrypto/webcrypto_util.h |
diff --git a/content/renderer/webcrypto/webcrypto_util.h b/content/renderer/webcrypto/webcrypto_util.h |
index 111b14b83cf7173c298464b2c286119116f15bb0..1a813079f9039a8cb1fc4959a51d55173e2cdc62 100644 |
--- a/content/renderer/webcrypto/webcrypto_util.h |
+++ b/content/renderer/webcrypto/webcrypto_util.h |
@@ -5,18 +5,20 @@ |
#ifndef CONTENT_RENDERER_WEBCRYPTO_WEBCRYPTO_UTIL_H_ |
#define CONTENT_RENDERER_WEBCRYPTO_WEBCRYPTO_UTIL_H_ |
-#include <map> |
#include <string> |
#include <vector> |
#include "base/basictypes.h" |
#include "content/common/content_export.h" |
#include "third_party/WebKit/public/platform/WebArrayBuffer.h" |
#include "third_party/WebKit/public/platform/WebCryptoAlgorithm.h" |
+#include "third_party/WebKit/public/platform/WebCryptoKey.h" |
namespace content { |
namespace webcrypto { |
+// TODO(eroman): Move Status class to a separate file |
+ |
// Status indicates whether an operation completed successfully, or with an |
// error. The error is used for verification in unit-tests, as well as for |
// display to the user. |
@@ -121,6 +123,8 @@ class CONTENT_EXPORT Status { |
// key using spki format. |
static Status ErrorUnexpectedKeyType(); |
+ static Status ErrorKeyAlgorithmMismatch(); |
Ryan Sleevi
2014/02/07 01:19:21
Why are you introducing this in this change?
eroman
2014/02/07 21:15:57
Will change to ErrorUnexpected for now()
|
+ |
// When doing an AES-CBC encryption/decryption, the "iv" parameter was not 16 |
// bytes. |
static Status ErrorIncorrectSizeAesCbcIv(); |
@@ -199,6 +203,7 @@ void ShrinkBuffer(blink::WebArrayBuffer* buffer, unsigned int new_size); |
blink::WebArrayBuffer CreateArrayBuffer(const uint8* data, |
unsigned int data_size); |
+// TODO(eroman): Move this to JWK file. |
// This function decodes unpadded 'base64url' encoded data, as described in |
// RFC4648 (http://www.ietf.org/rfc/rfc4648.txt) Section 5. |
// In Web Crypto, this type of encoding is only used inside JWK. |
@@ -258,6 +263,8 @@ blink::WebCryptoAlgorithm CreateAesGcmAlgorithm( |
// Returns the internal block size for SHA-* |
unsigned int ShaBlockSizeBytes(blink::WebCryptoAlgorithmId hash_id); |
+bool IsAlgorithmAsymmetric(const blink::WebCryptoAlgorithm& algorithm); |
Ryan Sleevi
2014/02/07 01:19:21
Ditto
eroman
2014/02/07 21:15:57
Was moving it out of webcrypto_impl.cc.
Will leave
|
+ |
} // namespace webcrypto |
} // namespace content |