ExtensionInstallDialogView: fix scrolling behavior on Views (Win,Linux)
[chromium-blink-merge.git] / components / webcrypto / openssl / rsa_sign_openssl.h
blob9aacfb18600f1febff8a1690e7ba17965d9f38c3
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
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_WEBCRYPTO_OPENSSL_RSA_SIGN_OPENSSL_H_
6 #define COMPONENTS_WEBCRYPTO_OPENSSL_RSA_SIGN_OPENSSL_H_
8 #include <stdint.h>
10 #include <vector>
12 namespace blink {
13 class WebCryptoKey;
16 namespace webcrypto {
18 class CryptoData;
19 class Status;
21 // Helper functions for doing RSA-SSA signing and verification
22 // (both PKCS1-v1_5 and PSS flavor).
24 // The salt length parameter is only relevant when the key is for RSA-PSS. In
25 // other cases it should be set to zero.
27 Status RsaSign(const blink::WebCryptoKey& key,
28 unsigned int pss_salt_length_bytes,
29 const CryptoData& data,
30 std::vector<uint8_t>* buffer);
32 Status RsaVerify(const blink::WebCryptoKey& key,
33 unsigned int pss_salt_length_bytes,
34 const CryptoData& signature,
35 const CryptoData& data,
36 bool* signature_match);
38 } // namespace webcrypto
40 #endif // COMPONENTS_WEBCRYPTO_OPENSSL_RSA_SIGN_OPENSSL_H_