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 | |
| 8 | #ifndef NDN_ENCRYPTION_MANAGER_HPP |
| 9 | #define NDN_ENCRYPTION_MANAGER_HPP |
| 10 | |
| 11 | #include "../../name.hpp" |
| 12 | #include "../security-common.hpp" |
| 13 | |
| 14 | namespace ndn { |
| 15 | |
| 16 | class EncryptionManager { |
| 17 | public: |
| 18 | virtual ~EncryptionManager() {} |
| 19 | |
| 20 | virtual void |
| 21 | createSymmetricKey(const Name& keyName, KeyType keyType, const Name& signkeyName = Name(), bool isSymmetric = true) = 0; |
| 22 | |
| 23 | virtual Blob |
| 24 | encrypt(const Name& keyName, const uint8_t* data, size_t dataLength, bool useSymmetric = false, |
| 25 | EncryptMode encryptMode = ENCRYPT_MODE_DEFAULT) = 0; |
| 26 | |
| 27 | virtual Blob |
| 28 | decrypt(const Name& keyName, const uint8_t* data, size_t dataLength, bool useSymmetric = false, |
| 29 | EncryptMode encryptMode = ENCRYPT_MODE_DEFAULT) = 0; |
| 30 | }; |
| 31 | |
| 32 | } |
| 33 | |
| 34 | #endif |