Jeff Thompson | 79a2d5d | 2013-09-27 14:32:23 -0700 | [diff] [blame] | 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */ |
| 2 | /** |
| 3 | * Copyright (C) 2013 Regents of the University of California. |
| 4 | * @author: Yingdi Yu <yingdi@cs.ucla.edu> |
| 5 | * See COPYING for copyright and distribution information. |
| 6 | */ |
| 7 | |
Yingdi Yu | 4b8c6a2 | 2014-04-15 23:00:54 -0700 | [diff] [blame] | 8 | #ifndef NDN_SECURITY_ENCRYPTION_MANAGER_HPP |
| 9 | #define NDN_SECURITY_ENCRYPTION_MANAGER_HPP |
Jeff Thompson | 79a2d5d | 2013-09-27 14:32:23 -0700 | [diff] [blame] | 10 | |
| 11 | #include "../../name.hpp" |
| 12 | #include "../security-common.hpp" |
| 13 | |
| 14 | namespace ndn { |
| 15 | |
Alexander Afanasyev | 2a7f720 | 2014-04-23 14:25:29 -0700 | [diff] [blame^] | 16 | class EncryptionManager |
| 17 | { |
Jeff Thompson | 79a2d5d | 2013-09-27 14:32:23 -0700 | [diff] [blame] | 18 | public: |
Yingdi Yu | 4b8c6a2 | 2014-04-15 23:00:54 -0700 | [diff] [blame] | 19 | virtual ~EncryptionManager() |
| 20 | { |
| 21 | } |
| 22 | |
| 23 | virtual void |
| 24 | createSymmetricKey(const Name& keyName, KeyType keyType, |
| 25 | const Name& signkeyName = Name(), bool isSymmetric = true) = 0; |
Jeff Thompson | 79a2d5d | 2013-09-27 14:32:23 -0700 | [diff] [blame] | 26 | |
Alexander Afanasyev | 64a3d81 | 2014-01-05 23:35:05 -0800 | [diff] [blame] | 27 | virtual ConstBufferPtr |
Yingdi Yu | 4b8c6a2 | 2014-04-15 23:00:54 -0700 | [diff] [blame] | 28 | encrypt(const Name& keyName, const uint8_t* data, size_t dataLength, bool useSymmetric = false, |
Jeff Thompson | 79a2d5d | 2013-09-27 14:32:23 -0700 | [diff] [blame] | 29 | EncryptMode encryptMode = ENCRYPT_MODE_DEFAULT) = 0; |
| 30 | |
Alexander Afanasyev | 64a3d81 | 2014-01-05 23:35:05 -0800 | [diff] [blame] | 31 | virtual ConstBufferPtr |
Yingdi Yu | 4b8c6a2 | 2014-04-15 23:00:54 -0700 | [diff] [blame] | 32 | decrypt(const Name& keyName, const uint8_t* data, size_t dataLength, bool useSymmetric = false, |
Jeff Thompson | 79a2d5d | 2013-09-27 14:32:23 -0700 | [diff] [blame] | 33 | EncryptMode encryptMode = ENCRYPT_MODE_DEFAULT) = 0; |
| 34 | }; |
| 35 | |
Yingdi Yu | 4b8c6a2 | 2014-04-15 23:00:54 -0700 | [diff] [blame] | 36 | } // namespace ndn |
Jeff Thompson | 79a2d5d | 2013-09-27 14:32:23 -0700 | [diff] [blame] | 37 | |
Yingdi Yu | 4b8c6a2 | 2014-04-15 23:00:54 -0700 | [diff] [blame] | 38 | #endif // NDN_SECURITY_ENCRYPTION_MANAGER_HPP |