signature.hpp
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
22 #ifndef NDN_SIGNATURE_HPP
23 #define NDN_SIGNATURE_HPP
24 
25 #include "common.hpp"
26 #include "util/blob.hpp"
27 #include "lite/signature-lite.hpp"
28 
29 namespace ndn {
30 
35 class Signature {
36 public:
40  virtual
41  ~Signature();
42 
47  virtual ptr_lib::shared_ptr<Signature>
48  clone() const = 0;
49 
54  virtual const Blob&
55  getSignature() const = 0;
56 
61  virtual void
62  setSignature(const Blob& signature) = 0;
63 
73  virtual void
74  get(SignatureLite& signatureLite) const = 0;
75 
81  virtual void
82  set(const SignatureLite& signatureLite) = 0;
83 
88  virtual uint64_t
89  getChangeCount() const = 0;
90 };
91 
92 }
93 
94 #endif
Copyright (C) 2013-2016 Regents of the University of California.
Definition: common.hpp:35
virtual const Blob & getSignature() const =0
Get the signature bytes.
virtual void setSignature(const Blob &signature)=0
Set the signature bytes to the given value.
virtual void set(const SignatureLite &signatureLite)=0
Clear this signature, and set the values by copying from signatureLite.
A SignatureLite holds a signature type, a KeyLocatorLite, the signature bytes and other fields to rep...
Definition: signature-lite.hpp:36
virtual uint64_t getChangeCount() const =0
Get the change count, which is incremented each time this object (or a child object) is changed...
A Signature is an abstract base class providing methods to work with the signature information in a D...
Definition: signature.hpp:35
A Blob holds a pointer to an immutable byte array implemented as const std::vector.
Definition: blob.hpp:42
virtual ~Signature()
The virtual destructor.
Definition: signature.cpp:28
virtual ptr_lib::shared_ptr< Signature > clone() const =0
Return a pointer to a new Signature which is a copy of this signature.