A SignatureLite holds a signature type, a KeyLocatorLite, the signature bytes and other fields to represent the Signature block of a Data packet.
More...
#include <signature-lite.hpp>
|
class | Tlv0_1_1WireFormatLite |
|
A SignatureLite holds a signature type, a KeyLocatorLite, the signature bytes and other fields to represent the Signature block of a Data packet.
This has the union of fields needed to represent specific types of signature such as Sha256WithRsaSignature and DigestSha256Signature.
ndn::SignatureLite::SignatureLite |
( |
ndn_NameComponent * |
keyNameComponents, |
|
|
size_t |
maxKeyNameComponents |
|
) |
| |
Create a SignatureLite with values for none.
- Parameters
-
keyNameComponents | The pre-allocated array of ndn_NameComponent for the keyLocatorLite. Instead of an array of NameLite::Component, this is an array of the underlying ndn_NameComponent struct so that it doesn't run the default constructor unnecessarily. |
maxKeyNameComponents | The number of elements in the allocated keyNameComponents array. |
int ndn::SignatureLite::getGenericTypeCode |
( |
| ) |
const |
|
inline |
Get the type code of the generic signature.
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. This is only meaningful if getType() is ndn_SignatureType_Generic.
- Returns
- The type code, or -1 if not known.
const BlobLite& ndn::SignatureLite::getSignatureInfoEncoding |
( |
| ) |
const |
|
inline |
Get the bytes of the entire signature info encoding (including the type code).
This is only meaningful if getType() is ndn_SignatureType_Generic.
- Returns
- The encoding bytes. If not specified, the value isNull().
Set this signature to have the values from the other signature.
- Parameters
-
- Returns
- 0 for success, or an error code if there is not enough room in this object's key locator keyName components array.
void ndn::SignatureLite::setSignature |
( |
const BlobLite & |
signature | ) |
|
|
inline |
Set the signature bytes.
- Parameters
-
signature | The signature bytes. This copies a pointer to the bytes, but does not copy the bytes. |
void ndn::SignatureLite::setSignatureInfoEncoding |
( |
const BlobLite & |
signatureInfoEncoding, |
|
|
int |
genericTypeCode |
|
) |
| |
|
inline |
Set the bytes of the entire signature info encoding (including the type code).
This is only meaningful if getType() is ndn_SignatureType_Generic.
- Parameters
-
signatureInfoEncoding | The encoding bytes. This copies a pointer to the bytes, but does not copy the bytes. |
genericTypeCode | (optional) The type code of the signature type, or -1 if not known. (When a Generic signature is created by wire decoding, it sets the typeCode.) |
The documentation for this class was generated from the following files: