NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
block-cipher.hpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
22
#ifndef NDN_CXX_SECURITY_TRANSFORM_BLOCK_CIPHER_HPP
23
#define NDN_CXX_SECURITY_TRANSFORM_BLOCK_CIPHER_HPP
24
25
#include "
transform-base.hpp
"
26
#include "../security-common.hpp"
27
28
namespace
ndn
{
29
namespace
security
{
30
namespace
transform {
31
38
class
BlockCipher
:
public
Transform
39
{
40
public
:
51
BlockCipher
(
BlockCipherAlgorithm
algo,
CipherOperator
op,
52
const
uint8_t* key,
size_t
keyLen,
53
const
uint8_t* iv,
size_t
ivLen);
54
55
private
:
59
virtual
void
60
preTransform()
final
;
61
67
virtual
size_t
68
convert(
const
uint8_t* data,
size_t
dataLen)
final
;
69
73
virtual
void
74
finalize()
final
;
75
79
void
80
fillOutputBuffer();
81
85
bool
86
isConverterEmpty()
const
;
87
88
private
:
89
90
void
91
initializeAesCbc(
const
uint8_t* key,
size_t
keyLen,
92
const
uint8_t* iv,
size_t
ivLen,
93
CipherOperator
op);
94
95
private
:
96
class
Impl
;
97
unique_ptr<Impl> m_impl;
98
};
99
100
unique_ptr<Transform>
101
blockCipher
(
BlockCipherAlgorithm
algo,
CipherOperator
op,
102
const
uint8_t* key,
size_t
keyLen,
103
const
uint8_t* iv,
size_t
ivLen);
104
105
}
// namespace transform
106
}
// namespace security
107
}
// namespace ndn
108
109
#endif // NDN_CXX_SECURITY_TRANSFORM_BLOCK_CIPHER_HPP
transform-base.hpp
There are three types of module in a transformation chain: Source, Transform, and Sink...
ndn
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-strategy-choice-helper.hpp:34
ndn::security::transform::BlockCipher::Impl
Definition:
block-cipher.cpp:31
ndn::BlockCipherAlgorithm
BlockCipherAlgorithm
Definition:
security-common.hpp:78
ndn::CipherOperator
CipherOperator
Definition:
security-common.hpp:86
ndn::security::transform::blockCipher
unique_ptr< Transform > blockCipher(BlockCipherAlgorithm algo, CipherOperator op, const uint8_t *key, size_t keyLen, const uint8_t *iv, size_t ivLen)
Definition:
block-cipher.cpp:157
ndn::security::transform::Transform
Abstraction of an intermediate transformation module.
Definition:
transform-base.hpp:185
ndn::security::transform::BlockCipher
The module to encrypt data using block cipher.
Definition:
block-cipher.hpp:38
security
ndn::security::transform::BlockCipher::BlockCipher
BlockCipher(BlockCipherAlgorithm algo, CipherOperator op, const uint8_t *key, size_t keyLen, const uint8_t *iv, size_t ivLen)
Create a block cipher.
Definition:
block-cipher.cpp:51
ndnSIM
ndn-cxx
src
security
transform
block-cipher.hpp
Generated on Wed Jan 11 2017 18:17:14 for ndnSIM by
1.8.13