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

Side by Side Diff: crypto/aead.h

Issue 1909513003: Rename crypto/ *_openssl files (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « crypto/BUILD.gn ('k') | crypto/aead.cc » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_AEAD_H_ 5 #ifndef CRYPTO_AEAD_H_
6 #define CRYPTO_AEAD_H_ 6 #define CRYPTO_AEAD_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include "base/strings/string_piece.h" 10 #include "base/strings/string_piece.h"
11 #include "crypto/crypto_export.h" 11 #include "crypto/crypto_export.h"
12 12
13 struct evp_aead_st; 13 struct evp_aead_st;
14 14
15 namespace crypto { 15 namespace crypto {
16 16
17 // This class exposes the AES-128-CTR-HMAC-SHA256 AEAD, currently only 17 // This class exposes the AES-128-CTR-HMAC-SHA256 AEAD.
18 // for OpenSSL builds.
19 class CRYPTO_EXPORT Aead { 18 class CRYPTO_EXPORT Aead {
20 public: 19 public:
21 enum AeadAlgorithm { AES_128_CTR_HMAC_SHA256 }; 20 enum AeadAlgorithm { AES_128_CTR_HMAC_SHA256 };
22 21
23 explicit Aead(AeadAlgorithm algorithm); 22 explicit Aead(AeadAlgorithm algorithm);
24 23
25 ~Aead(); 24 ~Aead();
26 25
27 void Init(const std::string* key); 26 void Init(const std::string* key);
28 27
(...skipping 12 matching lines...) Expand all
41 size_t NonceLength() const; 40 size_t NonceLength() const;
42 41
43 private: 42 private:
44 const std::string* key_; 43 const std::string* key_;
45 const evp_aead_st* aead_; 44 const evp_aead_st* aead_;
46 }; 45 };
47 46
48 } // namespace crypto 47 } // namespace crypto
49 48
50 #endif // CRYPTO_ENCRYPTOR_H_ 49 #endif // CRYPTO_ENCRYPTOR_H_
OLDNEW
« no previous file with comments | « crypto/BUILD.gn ('k') | crypto/aead.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698