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

Side by Side Diff: crypto/signature_verifier.h

Issue 6805019: Move crypto files out of base, to a top level directory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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 | Annotate | Revision Log
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 BASE_CRYPTO_SIGNATURE_VERIFIER_H_ 5 #ifndef CRYPTO_SIGNATURE_VERIFIER_H_
6 #define BASE_CRYPTO_SIGNATURE_VERIFIER_H_ 6 #define CRYPTO_SIGNATURE_VERIFIER_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_NSS) 11 #if defined(USE_NSS)
12 #include <cryptoht.h> 12 #include <cryptoht.h>
13 #elif defined(OS_MACOSX) 13 #elif defined(OS_MACOSX)
14 #include <Security/cssm.h> 14 #include <Security/cssm.h>
15 #endif 15 #endif
16 16
17 #include <vector> 17 #include <vector>
18 18
19 #include "base/base_api.h"
20 #include "base/basictypes.h" 19 #include "base/basictypes.h"
21 20
22 #if defined(OS_WIN) 21 #if defined(OS_WIN)
23 #include "base/crypto/scoped_capi_types.h" 22 #include "crypto/scoped_capi_types.h"
24 #endif 23 #endif
25 24
26 namespace base { 25 namespace crypto {
27 26
28 // The SignatureVerifier class verifies a signature using a bare public key 27 // The SignatureVerifier class verifies a signature using a bare public key
29 // (as opposed to a certificate). 28 // (as opposed to a certificate).
30 class BASE_API SignatureVerifier { 29 class SignatureVerifier {
31 public: 30 public:
32 SignatureVerifier(); 31 SignatureVerifier();
33 ~SignatureVerifier(); 32 ~SignatureVerifier();
34 33
35 // Streaming interface: 34 // Streaming interface:
36 35
37 // Initiates a signature verification operation. This should be followed 36 // Initiates a signature verification operation. This should be followed
38 // by one or more VerifyUpdate calls and a VerifyFinal call. 37 // by one or more VerifyUpdate calls and a VerifyFinal call.
39 // 38 //
40 // The signature algorithm is specified as a DER encoded ASN.1 39 // The signature algorithm is specified as a DER encoded ASN.1
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 CSSM_KEY public_key_; 96 CSSM_KEY public_key_;
98 #elif defined(OS_WIN) 97 #elif defined(OS_WIN)
99 ScopedHCRYPTPROV provider_; 98 ScopedHCRYPTPROV provider_;
100 99
101 ScopedHCRYPTHASH hash_object_; 100 ScopedHCRYPTHASH hash_object_;
102 101
103 ScopedHCRYPTKEY public_key_; 102 ScopedHCRYPTKEY public_key_;
104 #endif 103 #endif
105 }; 104 };
106 105
107 } // namespace base 106 } // namespace crypto
108 107
109 #endif // BASE_CRYPTO_SIGNATURE_VERIFIER_H_ 108 #endif // CRYPTO_SIGNATURE_VERIFIER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698