| /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */ |
| * Copyright (C) 2013 Regents of the University of California. |
| * @author: Jeff Thompson <jefft0@remap.ucla.edu> |
| * See COPYING for copyright and distribution information. |
| #ifndef NDN_SIGNATURE_HPP |
| #define NDN_SIGNATURE_HPP |
| * A Signature is storage for the signature-related information (info and value) in a Data packet. |
| SignatureSha256WithRsa = 1 |
| Signature(const Block &info, const Block &value) |
| Buffer::const_iterator i = info_.value_begin(); |
| Tlv::readVarNumber(i, info_.value_end()); |
| size_t length = Tlv::readVarNumber(i, info_.value_end()); |
| type_ = Tlv::readNonNegativeInteger(length, i, info_.value_end()); |
| setInfo(const Block &info) |
| if (info_.hasWire() || info_.hasValue()) |
| const Block &signatureType = info_.get(Tlv::SignatureType); |
| Buffer::const_iterator i = signatureType.value_begin(); |
| type_ = Tlv::readVarNumber(i, signatureType.value_end()); |
| setValue(const Block &value) |
| #endif // NDN_SIGNATURE_HPP |