NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
verifier-filter.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_VERIFIER_FILTER_HPP
23 #define NDN_CXX_SECURITY_TRANSFORM_VERIFIER_FILTER_HPP
24 
25 #include "transform-base.hpp"
26 #include "public-key.hpp"
27 #include "../security-common.hpp"
28 
29 namespace ndn {
30 namespace security {
31 namespace transform {
32 
38 class VerifierFilter : public Transform
39 {
40 public:
44  VerifierFilter(DigestAlgorithm algo, const PublicKey& key, const uint8_t* sig, size_t sigLen);
45 
46 private:
52  virtual size_t
53  convert(const uint8_t* buf, size_t size) final;
54 
58  virtual void
59  finalize() final;
60 
61 private:
62  class Impl;
63  unique_ptr<Impl> m_impl;
64 };
65 
66 unique_ptr<Transform>
67 verifierFilter(DigestAlgorithm algo, const PublicKey& key, const uint8_t* sig, size_t sigLen);
68 
69 } // namespace transform
70 } // namespace security
71 } // namespace ndn
72 
73 #endif // NDN_CXX_SECURITY_TRANSFORM_VERIFIER_FILTER_HPP
There are three types of module in a transformation chain: Source, Transform, and Sink...
Copyright (c) 2011-2015 Regents of the University of California.
The module to verify signature.
Abstraction of public key in crypto transformation.
Definition: public-key.hpp:37
VerifierFilter(DigestAlgorithm algo, const PublicKey &key, const uint8_t *sig, size_t sigLen)
Create a verifier module to verify signature sig using algorithm algo and key.
unique_ptr< Transform > verifierFilter(DigestAlgorithm algo, const PublicKey &key, const uint8_t *sig, size_t sigLen)
Abstraction of an intermediate transformation module.