NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
signature-sha256-with-rsa.cpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
23 
24 namespace ndn {
25 
28 {
29 }
30 
32  : Signature(signature)
33 {
35  BOOST_THROW_EXCEPTION(Error("Incorrect signature type"));
36 
37  if (!hasKeyLocator()) {
38  BOOST_THROW_EXCEPTION(Error("KeyLocator is missing"));
39  }
40 }
41 
42 void
43 SignatureSha256WithRsa::unsetKeyLocator()
44 {
45  BOOST_THROW_EXCEPTION(Error("KeyLocator cannot be reset for SignatureSha256WithRsa"));
46 }
47 
48 } // namespace ndn
Represent a SHA256-with-RSA signature.
Copyright (c) 2011-2015 Regents of the University of California.
bool hasKeyLocator() const
Check if SignatureInfo block has a KeyLocator.
Definition: signature.hpp:132
SignatureSha256WithRsa(const KeyLocator &keyLocator=KeyLocator())
uint32_t getType() const
Get signature type.
Definition: signature.hpp:123
A Signature is storage for the signature-related information (info and value) in a Data packet...
Definition: signature.hpp:33