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

Side by Side Diff: crypto/signature_creator.h

Issue 7491061: Rename CRYPTO_API to CRYPTO_EXPORT. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « crypto/sha2.h ('k') | crypto/signature_verifier.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 CRYPTO_SIGNATURE_CREATOR_H_ 5 #ifndef CRYPTO_SIGNATURE_CREATOR_H_
6 #define CRYPTO_SIGNATURE_CREATOR_H_ 6 #define CRYPTO_SIGNATURE_CREATOR_H_
7 #pragma once 7 #pragma once
8 8
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 10
11 #if defined(USE_OPENSSL) 11 #if defined(USE_OPENSSL)
12 // Forward declaration for openssl/*.h 12 // Forward declaration for openssl/*.h
13 typedef struct env_md_ctx_st EVP_MD_CTX; 13 typedef struct env_md_ctx_st EVP_MD_CTX;
14 #elif defined(USE_NSS) 14 #elif defined(USE_NSS)
15 // Forward declaration. 15 // Forward declaration.
16 struct SGNContextStr; 16 struct SGNContextStr;
17 #elif defined(OS_MACOSX) 17 #elif defined(OS_MACOSX)
18 #include <Security/cssm.h> 18 #include <Security/cssm.h>
19 #endif 19 #endif
20 20
21 #include <vector> 21 #include <vector>
22 22
23 #include "base/basictypes.h" 23 #include "base/basictypes.h"
24 #include "crypto/crypto_api.h" 24 #include "crypto/crypto_export.h"
25 #include "crypto/rsa_private_key.h" 25 #include "crypto/rsa_private_key.h"
26 26
27 #if defined(OS_WIN) 27 #if defined(OS_WIN)
28 #include "crypto/scoped_capi_types.h" 28 #include "crypto/scoped_capi_types.h"
29 #endif 29 #endif
30 30
31 namespace crypto { 31 namespace crypto {
32 32
33 // Signs data using a bare private key (as opposed to a full certificate). 33 // Signs data using a bare private key (as opposed to a full certificate).
34 // Currently can only sign data using SHA-1 with RSA encryption. 34 // Currently can only sign data using SHA-1 with RSA encryption.
35 class CRYPTO_API SignatureCreator { 35 class CRYPTO_EXPORT SignatureCreator {
36 public: 36 public:
37 ~SignatureCreator(); 37 ~SignatureCreator();
38 38
39 // Create an instance. The caller must ensure that the provided PrivateKey 39 // Create an instance. The caller must ensure that the provided PrivateKey
40 // instance outlives the created SignatureCreator. 40 // instance outlives the created SignatureCreator.
41 static SignatureCreator* Create(RSAPrivateKey* key); 41 static SignatureCreator* Create(RSAPrivateKey* key);
42 42
43 // Update the signature with more data. 43 // Update the signature with more data.
44 bool Update(const uint8* data_part, int data_part_len); 44 bool Update(const uint8* data_part, int data_part_len);
45 45
(...skipping 15 matching lines...) Expand all
61 #elif defined(OS_WIN) 61 #elif defined(OS_WIN)
62 ScopedHCRYPTHASH hash_object_; 62 ScopedHCRYPTHASH hash_object_;
63 #endif 63 #endif
64 64
65 DISALLOW_COPY_AND_ASSIGN(SignatureCreator); 65 DISALLOW_COPY_AND_ASSIGN(SignatureCreator);
66 }; 66 };
67 67
68 } // namespace crypto 68 } // namespace crypto
69 69
70 #endif // CRYPTO_SIGNATURE_CREATOR_H_ 70 #endif // CRYPTO_SIGNATURE_CREATOR_H_
OLDNEW
« no previous file with comments | « crypto/sha2.h ('k') | crypto/signature_verifier.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698