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 | |
| 16 | class EncryptionManager { |
| 17 | public: |
Yingdi Yu | 4b8c6a2 | 2014-04-15 23:00:54 -0700 | [diff] [blame] | 18 | virtual ~EncryptionManager() |
| 19 | { |
| 20 | } |
| 21 | |
| 22 | virtual void |
| 23 | createSymmetricKey(const Name& keyName, KeyType keyType, |
| 24 | const Name& signkeyName = Name(), bool isSymmetric = true) = 0; |
Jeff Thompson | 79a2d5d | 2013-09-27 14:32:23 -0700 | [diff] [blame] | 25 | |
Alexander Afanasyev | 64a3d81 | 2014-01-05 23:35:05 -0800 | [diff] [blame] | 26 | virtual ConstBufferPtr |
Yingdi Yu | 4b8c6a2 | 2014-04-15 23:00:54 -0700 | [diff] [blame] | 27 | 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] | 28 | EncryptMode encryptMode = ENCRYPT_MODE_DEFAULT) = 0; |
| 29 | |
Alexander Afanasyev | 64a3d81 | 2014-01-05 23:35:05 -0800 | [diff] [blame] | 30 | virtual ConstBufferPtr |
Yingdi Yu | 4b8c6a2 | 2014-04-15 23:00:54 -0700 | [diff] [blame] | 31 | 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] | 32 | EncryptMode encryptMode = ENCRYPT_MODE_DEFAULT) = 0; |
| 33 | }; |
| 34 | |
Yingdi Yu | 4b8c6a2 | 2014-04-15 23:00:54 -0700 | [diff] [blame] | 35 | } // namespace ndn |
Jeff Thompson | 79a2d5d | 2013-09-27 14:32:23 -0700 | [diff] [blame] | 36 | |
Yingdi Yu | 4b8c6a2 | 2014-04-15 23:00:54 -0700 | [diff] [blame] | 37 | #endif // NDN_SECURITY_ENCRYPTION_MANAGER_HPP |