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

Side by Side Diff: content/renderer/webcrypto/webcrypto_util.h

Issue 119413002: [webcrypto] Add key generation for AES-GCM and AES-KW for NSS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 12 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_RENDERER_WEBCRYPTO_WEBCRYPTO_UTIL_H_ 5 #ifndef CONTENT_RENDERER_WEBCRYPTO_WEBCRYPTO_UTIL_H_
6 #define CONTENT_RENDERER_WEBCRYPTO_WEBCRYPTO_UTIL_H_ 6 #define CONTENT_RENDERER_WEBCRYPTO_WEBCRYPTO_UTIL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 // Creates an AES-CBC algorithm. 77 // Creates an AES-CBC algorithm.
78 CONTENT_EXPORT blink::WebCryptoAlgorithm CreateAesCbcAlgorithm( 78 CONTENT_EXPORT blink::WebCryptoAlgorithm CreateAesCbcAlgorithm(
79 const std::vector<uint8>& iv); 79 const std::vector<uint8>& iv);
80 80
81 // Creates and AES-GCM algorithm. 81 // Creates and AES-GCM algorithm.
82 blink::WebCryptoAlgorithm CreateAesGcmAlgorithm( 82 blink::WebCryptoAlgorithm CreateAesGcmAlgorithm(
83 const std::vector<uint8>& iv, 83 const std::vector<uint8>& iv,
84 const std::vector<uint8>& additional_data, 84 const std::vector<uint8>& additional_data,
85 uint8 tag_length_bytes); 85 uint8 tag_length_bytes);
86 86
87 // Creates an AES-CBC algorithm whose parameters struct is compatible with key
88 // generation.
89 CONTENT_EXPORT blink::WebCryptoAlgorithm CreateAesCbcKeyGenAlgorithm(
90 unsigned short key_length_bits);
91
92 // Creates an AES-GCM algorithm whose parameters struct is compatible with key
93 // generation.
94 blink::WebCryptoAlgorithm CreateAesGcmKeyGenAlgorithm(
95 unsigned short key_length_bits);
96
97 // Returns the internal block size for SHA-* 87 // Returns the internal block size for SHA-*
98 unsigned int ShaBlockSizeBytes(blink::WebCryptoAlgorithmId hash_id); 88 unsigned int ShaBlockSizeBytes(blink::WebCryptoAlgorithmId hash_id);
99 89
100 } // namespace webcrypto 90 } // namespace webcrypto
101 91
102 } // namespace content 92 } // namespace content
103 93
104 #endif // CONTENT_RENDERER_WEBCRYPTO_WEBCRYPTO_UTIL_H_ 94 #endif // CONTENT_RENDERER_WEBCRYPTO_WEBCRYPTO_UTIL_H_
OLDNEW
« no previous file with comments | « content/renderer/webcrypto/webcrypto_impl_unittest.cc ('k') | content/renderer/webcrypto/webcrypto_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698