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

Side by Side Diff: components/webcrypto/openssl/rsa_sign_openssl.h

Issue 1077273002: html_viewer: Move webcrypto to a place where html_viewer can use it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to ToT Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_CHILD_WEBCRYPTO_OPENSSL_RSA_SIGN_OPENSSL_H_ 5 #ifndef COMPONENTS_WEBCRYPTO_OPENSSL_RSA_SIGN_OPENSSL_H_
6 #define CONTENT_CHILD_WEBCRYPTO_OPENSSL_RSA_SIGN_OPENSSL_H_ 6 #define COMPONENTS_WEBCRYPTO_OPENSSL_RSA_SIGN_OPENSSL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <vector> 10 #include <vector>
11 11
12 namespace blink { 12 namespace blink {
13 class WebCryptoKey; 13 class WebCryptoKey;
14 } 14 }
15 15
16 namespace content {
17
18 namespace webcrypto { 16 namespace webcrypto {
19 17
20 class CryptoData; 18 class CryptoData;
21 class Status; 19 class Status;
22 20
23 // Helper functions for doing RSA-SSA signing and verification 21 // Helper functions for doing RSA-SSA signing and verification
24 // (both PKCS1-v1_5 and PSS flavor). 22 // (both PKCS1-v1_5 and PSS flavor).
25 // 23 //
26 // The salt length parameter is only relevant when the key is for RSA-PSS. In 24 // The salt length parameter is only relevant when the key is for RSA-PSS. In
27 // other cases it should be set to zero. 25 // other cases it should be set to zero.
28 26
29 Status RsaSign(const blink::WebCryptoKey& key, 27 Status RsaSign(const blink::WebCryptoKey& key,
30 unsigned int pss_salt_length_bytes, 28 unsigned int pss_salt_length_bytes,
31 const CryptoData& data, 29 const CryptoData& data,
32 std::vector<uint8_t>* buffer); 30 std::vector<uint8_t>* buffer);
33 31
34 Status RsaVerify(const blink::WebCryptoKey& key, 32 Status RsaVerify(const blink::WebCryptoKey& key,
35 unsigned int pss_salt_length_bytes, 33 unsigned int pss_salt_length_bytes,
36 const CryptoData& signature, 34 const CryptoData& signature,
37 const CryptoData& data, 35 const CryptoData& data,
38 bool* signature_match); 36 bool* signature_match);
39 37
40 } // namespace webcrypto 38 } // namespace webcrypto
41 39
42 } // namespace content 40 #endif // COMPONENTS_WEBCRYPTO_OPENSSL_RSA_SIGN_OPENSSL_H_
43
44 #endif // CONTENT_CHILD_WEBCRYPTO_OPENSSL_RSA_SIGN_OPENSSL_H_
OLDNEW
« no previous file with comments | « components/webcrypto/openssl/rsa_pss_openssl.cc ('k') | components/webcrypto/openssl/rsa_sign_openssl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698