|
NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
|
API Documentation
|
Go to the documentation of this file.
47 const uint8_t*
buf =
nullptr;
49 const uint8_t*
sig =
nullptr;
73 const uint8_t* key,
size_t keyLen)
107 return ParseResult();
118 return ParseResult();
126 params.sig, params.sigLen, key);
133 return params.isParsable && bool(tpm.
verify(params.buf, params.bufLen,
134 params.sig, params.sigLen, keyName, digestAlgorithm));
141 params.sig, params.sigLen, key, keyLen);
209 verifyDigest(
const uint8_t* blob,
size_t blobLen,
const uint8_t* digest,
size_t digestLen,
223 if (result->size() != digestLen)
227 return CRYPTO_memcmp(result->data(), digest, digestLen) == 0;
233 ParseResult parseResult =
parse(data);
234 return parseResult.isParsable &&
verifyDigest(parseResult.buf, parseResult.bufLen,
235 parseResult.sig, parseResult.sigLen, algorithm);
241 ParseResult parseResult =
parse(interest);
242 return parseResult.isParsable &&
verifyDigest(parseResult.buf, parseResult.bufLen,
243 parseResult.sig, parseResult.sigLen, algorithm);
bool verifyDigest(const uint8_t *blob, size_t blobLen, const uint8_t *digest, size_t digestLen, DigestAlgorithm algorithm)
Verify blob against digest using algorithm.
const Block & getValue() const
Get SignatureValue.
size_t value_size() const noexcept
Return the size of TLV-VALUE, aka TLV-LENGTH.
size_t size() const
Returns the number of components.
const Block & getContent() const
Get Content.
size_t wireEncode(EncodingImpl< TAG > &encoder, bool wantUnsignedPortionOnly=false) const
Prepend wire encoding to encoder in NDN Packet Format v0.2.
bool verifySignature(const uint8_t *blob, size_t blobLen, const uint8_t *sig, size_t sigLen, const transform::PublicKey &key)
Verify blob using key against sig.
Represents an absolute name.
The certificate following the certificate format naming convention.
const ssize_t POS_SIG_VALUE
size_t wireEncode(EncodingImpl< TAG > &encoder) const
Fast encoding or block size estimation.
boost::logic::tribool verify(const uint8_t *buf, size_t bufLen, const uint8_t *sig, size_t sigLen, const Name &keyName, DigestAlgorithm digestAlgorithm) const
Verify blob using the key with name keyName and using the digest digestAlgorithm.
Represents an Interest packet.
Represents a Data packet.
static ParseResult parse(const Data &data)
implements an output stream that constructs ndn::Buffer
const uint8_t * value() const noexcept
Return a raw pointer to the beginning of TLV-VALUE.
Represents a TLV element of NDN packet format.
A frontend handle of a key instance.
size_t size() const
Return the size of the encoded wire, i.e.
const size_t MIN_SIZE
minimal number of components for Signed Interest
const Name & getName() const noexcept
const Buffer & getPublicKey() const
Get public key bits.
shared_ptr< Buffer > buf()
Flush written data to the stream and return shared pointer to the underlying buffer.
represents an error in TLV encoding or decoding
shared_ptr< const Buffer > ConstBufferPtr
Copyright (c) 2011-2015 Regents of the University of California.
const Signature & getSignature() const
Get Signature.