[email protected] | 6b2e61f | 2012-02-28 08:06:54 | [diff] [blame] | 1 | // Copyright (c) 2012 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 CRYPTO_EC_SIGNATURE_CREATOR_IMPL_H_ | ||||
6 | #define CRYPTO_EC_SIGNATURE_CREATOR_IMPL_H_ | ||||
[email protected] | 6b2e61f | 2012-02-28 08:06:54 | [diff] [blame] | 7 | |
avi | dd373b8b | 2015-12-21 21:34:43 | [diff] [blame] | 8 | #include <stdint.h> |
9 | |||||
[email protected] | 6b2e61f | 2012-02-28 08:06:54 | [diff] [blame] | 10 | #include "base/compiler_specific.h" |
avi | dd373b8b | 2015-12-21 21:34:43 | [diff] [blame] | 11 | #include "base/macros.h" |
[email protected] | 6b2e61f | 2012-02-28 08:06:54 | [diff] [blame] | 12 | #include "crypto/ec_signature_creator.h" |
13 | |||||
14 | namespace crypto { | ||||
15 | |||||
16 | class ECSignatureCreatorImpl : public ECSignatureCreator { | ||||
17 | public: | ||||
18 | explicit ECSignatureCreatorImpl(ECPrivateKey* key); | ||||
dcheng | 0db63a9 | 2014-12-22 23:40:21 | [diff] [blame] | 19 | ~ECSignatureCreatorImpl() override; |
[email protected] | 6b2e61f | 2012-02-28 08:06:54 | [diff] [blame] | 20 | |
avi | dd373b8b | 2015-12-21 21:34:43 | [diff] [blame] | 21 | bool Sign(const uint8_t* data, |
dcheng | 0db63a9 | 2014-12-22 23:40:21 | [diff] [blame] | 22 | int data_len, |
avi | dd373b8b | 2015-12-21 21:34:43 | [diff] [blame] | 23 | std::vector<uint8_t>* signature) override; |
[email protected] | 6b2e61f | 2012-02-28 08:06:54 | [diff] [blame] | 24 | |
avi | dd373b8b | 2015-12-21 21:34:43 | [diff] [blame] | 25 | bool DecodeSignature(const std::vector<uint8_t>& der_sig, |
26 | std::vector<uint8_t>* out_raw_sig) override; | ||||
[email protected] | 7c3090a0 | 2012-09-19 15:11:33 | [diff] [blame] | 27 | |
[email protected] | 6b2e61f | 2012-02-28 08:06:54 | [diff] [blame] | 28 | private: |
29 | ECPrivateKey* key_; | ||||
[email protected] | 6b2e61f | 2012-02-28 08:06:54 | [diff] [blame] | 30 | |
31 | DISALLOW_COPY_AND_ASSIGN(ECSignatureCreatorImpl); | ||||
32 | }; | ||||
33 | |||||
34 | } // namespace crypto | ||||
35 | |||||
36 | #endif // CRYPTO_EC_SIGNATURE_CREATOR_IMPL_H_ |