A GenericSignature extends Signature and holds the encoding bytes of the SignatureInfo so that the application can process experimental signature types.
More...
#include <generic-signature.hpp>
A GenericSignature extends Signature and holds the encoding bytes of the SignatureInfo so that the application can process experimental signature types.
When decoding a packet, if the type of SignatureInfo is not recognized, the library creates a GenericSignature.
ptr_lib::shared_ptr< Signature > ndn::GenericSignature::clone |
( |
| ) |
const |
|
virtual |
void ndn::GenericSignature::get |
( |
SignatureLite & |
signatureLite | ) |
const |
|
virtual |
Set signatureLite to point to the values in this signature object, without copying any memory.
WARNING: The resulting pointers in signatureLite are invalid after a further use of this object which could reallocate memory.
- Parameters
-
signatureLite | A SignatureLite object where the name components array is already allocated. |
Implements ndn::Signature.
uint64_t ndn::GenericSignature::getChangeCount |
( |
| ) |
const |
|
virtual |
Get the change count, which is incremented each time this object is changed.
- Returns
- The change count.
Implements ndn::Signature.
const Blob & ndn::GenericSignature::getSignature |
( |
| ) |
const |
|
virtual |
Get the signature bytes.
- Returns
- The signature bytes. If not specified, the value isNull().
Implements ndn::Signature.
const Blob& ndn::GenericSignature::getSignatureInfoEncoding |
( |
| ) |
const |
|
inline |
Get the bytes of the entire signature info encoding (including the type code).
- Returns
- The encoding bytes. If not specified, the value isNull().
int ndn::GenericSignature::getTypeCode |
( |
| ) |
const |
|
inline |
Get the type code of the signature type.
When wire decode calls setSignatureInfoEncoding, it sets the type code. Note that the type code is ignored during wire encode, which simply uses getSignatureInfoEncoding() where the encoding already has the type code.
- Returns
- The type code, or -1 if not known.
void ndn::GenericSignature::set |
( |
const SignatureLite & |
signatureLite | ) |
|
|
virtual |
Clear this signature, and set the values by copying from signatureLite.
- Parameters
-
Implements ndn::Signature.
void ndn::GenericSignature::setSignature |
( |
const Blob & |
signature | ) |
|
|
virtual |
Set the signature bytes to the given value.
- Parameters
-
signature | A Blob with the signature bytes. |
Implements ndn::Signature.
void ndn::GenericSignature::setSignatureInfoEncoding |
( |
const Blob & |
signatureInfoEncoding, |
|
|
int |
typeCode = -1 |
|
) |
| |
|
inline |
Set the bytes of the entire signature info encoding (including the type code).
- Parameters
-
signatureInfoEncoding | A Blob with the encoding bytes. |
typeCode | (optional) The type code of the signature type, or -1 if not known. (When a GenericSignature is created by wire decoding, it sets the typeCode.) |
The documentation for this class was generated from the following files: