NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
security-common.hpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
22 #ifndef NDN_SECURITY_COMMON_HPP
23 #define NDN_SECURITY_COMMON_HPP
24 
25 #include "../common.hpp"
26 
27 #define NDN_CXX_KEEP_SECURITY_V1_ALIASES
28 
29 namespace ndn {
30 
31 namespace signed_interest {
32 
33 const ssize_t POS_SIG_VALUE = -1;
34 const ssize_t POS_SIG_INFO = -2;
35 const ssize_t POS_RANDOM_VAL = -3;
36 const ssize_t POS_TIMESTAMP = -4;
37 
41 const size_t MIN_LENGTH = 4;
42 
46 const size_t MIN_LENGTH_SIG_ONLY = 2;
47 
48 } // namespace signed_interest
49 
50 enum class KeyType {
51  NONE = 0,
52  RSA = 1,
53  EC = 2,
54  AES = 128
55 };
56 
57 std::ostream&
58 operator<<(std::ostream& os, KeyType keyType);
59 
60 enum class KeyClass {
61  NONE,
62  PUBLIC,
63  PRIVATE,
64  SYMMETRIC
65 };
66 
67 std::ostream&
68 operator<<(std::ostream& os, KeyClass keyClass);
69 
70 enum class DigestAlgorithm {
71  NONE = 0,
72  SHA256 = 1
73 };
74 
75 std::ostream&
76 operator<<(std::ostream& os, DigestAlgorithm algorithm);
77 
79  NONE,
80  AES_CBC
81 };
82 
83 std::ostream&
84 operator<<(std::ostream& os, BlockCipherAlgorithm algorithm);
85 
86 enum class CipherOperator {
87  DECRYPT = 0,
88  ENCRYPT = 1
89 };
90 
91 std::ostream&
92 operator<<(std::ostream& os, CipherOperator op);
93 
94 enum class AclType {
95  NONE,
96  PUBLIC,
97  PRIVATE
98 };
99 
100 std::ostream&
101 operator<<(std::ostream& os, AclType aclType);
102 
103 } // namespace ndn
104 
105 #endif // NDN_SECURITY_COMMON_HPP
Copyright (c) 2011-2015 Regents of the University of California.
const ssize_t POS_RANDOM_VAL
BlockCipherAlgorithm
std::ostream & operator<<(std::ostream &os, const Data &data)
Definition: data.cpp:320
const ssize_t POS_TIMESTAMP
const size_t MIN_LENGTH
minimal number of components for Command Interest
const ssize_t POS_SIG_VALUE
const ssize_t POS_SIG_INFO
const size_t MIN_LENGTH_SIG_ONLY
minimal number of components for Signed Interest