| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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_OPENPGP_SYMMETRIC_ENCRYPTION_H_ | 5 #ifndef CRYPTO_OPENPGP_SYMMETRIC_ENCRYPTION_H_ |
| 6 #define CRYPTO_OPENPGP_SYMMETRIC_ENCRYPTION_H_ | 6 #define CRYPTO_OPENPGP_SYMMETRIC_ENCRYPTION_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/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 namespace crypto { | 13 namespace crypto { |
| 14 | 14 |
| 15 // OpenPGPSymmetricEncrytion implements enough of RFC 4880 to read and write | 15 // OpenPGPSymmetricEncrytion implements enough of RFC 4880 to read and write |
| 16 // uncompressed, symmetrically encrypted data. You can create ciphertext | 16 // uncompressed, symmetrically encrypted data. You can create ciphertext |
| 17 // compatable with this code from the command line with: | 17 // compatable with this code from the command line with: |
| 18 // gpg --compress-algo=NONE --cipher-algo=AES -c | 18 // gpg --compress-algo=NONE --cipher-algo=AES -c |
| 19 // | 19 // |
| 20 // Likewise, the output of this can be decrypted on the command line with: | 20 // Likewise, the output of this can be decrypted on the command line with: |
| (...skipping 15 matching lines...) Expand all Loading... |
| 36 std::string *out); | 36 std::string *out); |
| 37 | 37 |
| 38 static std::string Encrypt(base::StringPiece plaintext, | 38 static std::string Encrypt(base::StringPiece plaintext, |
| 39 base::StringPiece passphrase); | 39 base::StringPiece passphrase); |
| 40 }; | 40 }; |
| 41 | 41 |
| 42 } // namespace crypto | 42 } // namespace crypto |
| 43 | 43 |
| 44 #endif // CRYPTO_OPENPGP_SYMMETRIC_ENCRYPTION_H_ | 44 #endif // CRYPTO_OPENPGP_SYMMETRIC_ENCRYPTION_H_ |
| 45 | 45 |
| OLD | NEW |