blob: 44eafb7f31d17c55a5ec048447bda6b990a52595 [file] [log] [blame]
Jeff Thompson79a2d5d2013-09-27 14:32:23 -07001/* -*- 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
Jeff Thompsone589c3f2013-10-12 17:30:50 -07009#define NDN_ENCRYPTION_MANAGER_HPP
Jeff Thompson79a2d5d2013-09-27 14:32:23 -070010
11#include "../../name.hpp"
12#include "../security-common.hpp"
13
14namespace ndn {
15
16class EncryptionManager {
17public:
18 virtual ~EncryptionManager() {}
19
20 virtual void
21 createSymmetricKey(const Name& keyName, KeyType keyType, const Name& signkeyName = Name(), bool isSymmetric = true) = 0;
22
Alexander Afanasyev64a3d812014-01-05 23:35:05 -080023 virtual ConstBufferPtr
Jeff Thompson79a2d5d2013-09-27 14:32:23 -070024 encrypt(const Name& keyName, const uint8_t* data, size_t dataLength, bool useSymmetric = false,
25 EncryptMode encryptMode = ENCRYPT_MODE_DEFAULT) = 0;
26
Alexander Afanasyev64a3d812014-01-05 23:35:05 -080027 virtual ConstBufferPtr
Jeff Thompson79a2d5d2013-09-27 14:32:23 -070028 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