ndn::security::transform Namespace Reference

Classes

class  Base64Decode
 The module to perform Base64 decoding transformation. More...
 
class  Base64Encode
 The module to perform Base64 encoding transformation. More...
 
class  BlockCipher
 The module to encrypt data using block cipher. More...
 
class  BoolSink
 A sink which outputs only one boolean value. More...
 
class  BufferSource
 A source taking one or more memory buffers as input. More...
 
class  DigestFilter
 The module to calculate digests. More...
 
class  Downstream
 The downstream interface of a transformation module. More...
 
class  Error
 Base class of transformation error. More...
 
class  HexDecode
 The module to perform hexadecimal decoding transformation. More...
 
class  HexEncode
 The module to perform hexadecimal encoding transformation. More...
 
class  PrivateKey
 Abstraction of a private key in crypto transformations. More...
 
class  PublicKey
 Abstraction of a public key in crypto transformations. More...
 
class  SignerFilter
 The module to sign data. More...
 
class  Sink
 Abstraction of the transformation sink module. More...
 
class  Source
 Abstraction of the transformation source module. More...
 
class  StepSource
 A source that can accept input step by step, and can close input explicitly. More...
 
class  StreamSink
 A sink which directs output to an std::ostream. More...
 
class  StreamSource
 A source taking an std::istream as input. More...
 
class  StripSpace
 Strip whitespace characters from a stream. More...
 
class  Transform
 Abstraction of an intermediate transformation module. More...
 
class  Upstream
 The upstream interface of a transformation module. More...
 
class  VerifierFilter
 The module to verify signatures. More...
 

Typedefs

using bufferSource = BufferSource
 
using stepSource = StepSource
 
using streamSource = StreamSource
 

Functions

unique_ptr< Transformbase64Decode (bool expectNewlineEvery64Bytes)
 
unique_ptr< Transformbase64Encode (bool needBreak)
 
unique_ptr< TransformblockCipher (BlockCipherAlgorithm algo, CipherOperator op, span< const uint8_t > key, span< const uint8_t > iv)
 
unique_ptr< SinkboolSink (bool &value)
 
unique_ptr< TransformdigestFilter (DigestAlgorithm algo)
 
unique_ptr< PrivateKeygeneratePrivateKey (const KeyParams &keyParams)
 Generate a private key according to keyParams. More...
 
unique_ptr< TransformhexDecode ()
 
unique_ptr< TransformhexEncode (bool useUpperCase)
 
unique_ptr< TransformsignerFilter (DigestAlgorithm algo, const PrivateKey &key)
 
unique_ptr< SinkstreamSink (std::ostream &os)
 
unique_ptr< TransformstripSpace (const char *whitespaces=StripSpace::DEFAULT_WHITESPACES)
 Constructs a StripSpace transform. More...
 
unique_ptr< TransformverifierFilter (DigestAlgorithm algo, const PrivateKey &key, span< const uint8_t > sig)
 
unique_ptr< TransformverifierFilter (DigestAlgorithm algo, const PublicKey &key, span< const uint8_t > sig)
 

Typedef Documentation

◆ bufferSource

Definition at line 71 of file buffer-source.hpp.

◆ stepSource

Definition at line 73 of file step-source.hpp.

◆ streamSource

Definition at line 60 of file stream-source.hpp.

Function Documentation

◆ base64Decode()

unique_ptr< Transform > ndn::security::transform::base64Decode ( bool  expectNewlineEvery64Bytes)

Definition at line 124 of file base64-decode.cpp.

◆ base64Encode()

unique_ptr< Transform > ndn::security::transform::base64Encode ( bool  needBreak)

Definition at line 127 of file base64-encode.cpp.

◆ blockCipher()

unique_ptr< Transform > ndn::security::transform::blockCipher ( BlockCipherAlgorithm  algo,
CipherOperator  op,
span< const uint8_t >  key,
span< const uint8_t >  iv 
)

Definition at line 159 of file block-cipher.cpp.

◆ boolSink()

unique_ptr< Sink > ndn::security::transform::boolSink ( bool &  value)

Definition at line 37 of file bool-sink.cpp.

◆ digestFilter()

unique_ptr< Transform > ndn::security::transform::digestFilter ( DigestAlgorithm  algo)

Definition at line 74 of file digest-filter.cpp.

◆ generatePrivateKey()

unique_ptr< PrivateKey > ndn::security::transform::generatePrivateKey ( const KeyParams keyParams)

Generate a private key according to keyParams.

Note
The corresponding public key can be derived from the private key.
Exceptions
std::invalid_argumentthe specified key type is not supported
PrivateKey::Errorkey generation failed

Definition at line 524 of file private-key.cpp.

◆ hexDecode()

unique_ptr< Transform > ndn::security::transform::hexDecode ( )

Definition at line 106 of file hex-decode.cpp.

◆ hexEncode()

unique_ptr< Transform > ndn::security::transform::hexEncode ( bool  useUpperCase)

Definition at line 62 of file hex-encode.cpp.

◆ signerFilter()

unique_ptr< Transform > ndn::security::transform::signerFilter ( DigestAlgorithm  algo,
const PrivateKey key 
)

Definition at line 81 of file signer-filter.cpp.

◆ streamSink()

unique_ptr< Sink > ndn::security::transform::streamSink ( std::ostream &  os)

Definition at line 51 of file stream-sink.cpp.

◆ stripSpace()

unique_ptr< Transform > ndn::security::transform::stripSpace ( const char *  whitespaces = StripSpace::DEFAULT_WHITESPACES)

Constructs a StripSpace transform.

Parameters
whitespacescharacters classified as whitespaces, terminated with null

Definition at line 52 of file strip-space.cpp.

◆ verifierFilter() [1/2]

unique_ptr< Transform > ndn::security::transform::verifierFilter ( DigestAlgorithm  algo,
const PrivateKey key,
span< const uint8_t >  sig 
)

Definition at line 131 of file verifier-filter.cpp.

◆ verifierFilter() [2/2]

unique_ptr< Transform > ndn::security::transform::verifierFilter ( DigestAlgorithm  algo,
const PublicKey key,
span< const uint8_t >  sig 
)

Definition at line 125 of file verifier-filter.cpp.