Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CONTENT_RENDERER_WEBCRYPTO_WEBCRYPTO_UTI_H_ | |
|
eroman
2013/10/28 23:02:00
typo I presume: UTI --> UTIL
padolph
2013/10/29 02:25:40
Done.
| |
| 6 #define CONTENT_RENDERER_WEBCRYPTO_WEBCRYPTO_UTI_H_ | |
| 7 | |
| 8 #include <map> | |
| 9 #include <string> | |
| 10 #include <vector> | |
| 11 #include "base/basictypes.h" | |
| 12 #include "third_party/WebKit/public/platform/WebArrayBuffer.h" | |
| 13 #include "third_party/WebKit/public/platform/WebCryptoAlgorithm.h" | |
| 14 | |
| 15 namespace content { | |
|
eroman
2013/10/28 23:02:00
I'm not entirely sure on whether we should put thi
| |
| 16 | |
| 17 const uint8* Start(const std::vector<uint8>& data); | |
|
eroman
2013/10/28 23:02:00
I'm not sure how I feel about this being in the he
padolph
2013/10/29 02:25:40
I would like to remove this altogether, because I'
eroman
2013/10/29 03:03:46
The reason for Start() was to avoid doing &vec[0]
| |
| 18 | |
| 19 void ShrinkBuffer(WebKit::WebArrayBuffer* buffer, unsigned new_size); | |
| 20 | |
| 21 bool Base64DecodeUrlSafe(const std::string& input, std::string* output); | |
|
eroman
2013/10/28 23:02:00
Please move the function-level comments from the .
padolph
2013/10/29 02:25:40
Done.
| |
| 22 | |
| 23 WebKit::WebCryptoAlgorithm CreateAlgorithm(WebKit::WebCryptoAlgorithmId id); | |
| 24 | |
| 25 WebKit::WebCryptoAlgorithm CreateHmacAlgorithmByKeyLen( | |
| 26 unsigned short hash_key_length); | |
| 27 | |
| 28 WebKit::WebCryptoAlgorithm CreateHmacAlgorithmByHashId( | |
| 29 WebKit::WebCryptoAlgorithmId hashId); | |
| 30 | |
| 31 WebKit::WebCryptoAlgorithm CreateHmacKeyGenAlgorithm( | |
| 32 WebKit::WebCryptoAlgorithmId hashId, | |
| 33 unsigned hash_length); | |
|
eroman
2013/10/28 23:02:00
side comment: We may want to change the parameter
padolph
2013/10/29 02:25:40
I thought that was going to be fixed in the spec.
| |
| 34 | |
| 35 WebKit::WebCryptoAlgorithm CreateRsaEsAlgorithm(); | |
| 36 | |
| 37 WebKit::WebCryptoAlgorithm CreateRsaSsaAlgorithmByKeyLen( | |
| 38 unsigned short hash_key_length); | |
| 39 | |
| 40 WebKit::WebCryptoAlgorithm CreateRsaOaepAlgorithmByKeyLen( | |
| 41 unsigned short hash_key_length); | |
| 42 | |
| 43 WebKit::WebCryptoAlgorithm CreateAesCbcAlgorithm(const std::vector<uint8>& iv); | |
| 44 | |
| 45 WebKit::WebCryptoAlgorithm CreateAesGcmAlgorithm(const std::vector<uint8>& iv, | |
| 46 const std::vector<uint8>& additionalData, unsigned char tagLength); | |
|
eroman
2013/10/28 23:02:00
use hacker_style_naming for variables in chromium
padolph
2013/10/29 02:25:40
Done.
| |
| 47 | |
| 48 WebKit::WebCryptoAlgorithm CreateAesCbcKeyGenAlgorithm(unsigned short length); | |
| 49 | |
| 50 WebKit::WebCryptoAlgorithm CreateAesGcmKeyGenAlgorithm(unsigned short length); | |
| 51 | |
| 52 } // namespace content | |
| 53 | |
| 54 #endif // CONTENT_RENDERER_WEBCRYPTO_WEBCRYPTO_UTI_H_ | |
| OLD | NEW |