| OLD | NEW |
| (Empty) |
| 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. | |
| 4 | |
| 5 #ifndef COMPONENTS_WEBCRYPTO_OPENSSL_RSA_SIGN_OPENSSL_H_ | |
| 6 #define COMPONENTS_WEBCRYPTO_OPENSSL_RSA_SIGN_OPENSSL_H_ | |
| 7 | |
| 8 #include <stdint.h> | |
| 9 | |
| 10 #include <vector> | |
| 11 | |
| 12 namespace blink { | |
| 13 class WebCryptoKey; | |
| 14 } | |
| 15 | |
| 16 namespace webcrypto { | |
| 17 | |
| 18 class CryptoData; | |
| 19 class Status; | |
| 20 | |
| 21 // Helper functions for doing RSA-SSA signing and verification | |
| 22 // (both PKCS1-v1_5 and PSS flavor). | |
| 23 // | |
| 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. | |
| 26 | |
| 27 Status RsaSign(const blink::WebCryptoKey& key, | |
| 28 unsigned int pss_salt_length_bytes, | |
| 29 const CryptoData& data, | |
| 30 std::vector<uint8_t>* buffer); | |
| 31 | |
| 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); | |
| 37 | |
| 38 } // namespace webcrypto | |
| 39 | |
| 40 #endif // COMPONENTS_WEBCRYPTO_OPENSSL_RSA_SIGN_OPENSSL_H_ | |
| OLD | NEW |