ndn-lite
Functions
signature.c File Reference
#include "signature.h"

Functions

int ndn_signature_info_tlv_encode (ndn_encoder_t *encoder, const ndn_signature_t *signature)
 Encode the Signature info into wire format (TLV block) from Signature structure. More...
 
int ndn_signature_value_tlv_encode (ndn_encoder_t *encoder, const ndn_signature_t *signature)
 Encode the Signature value into wire format (TLV block) from Signature structure. More...
 
int ndn_signature_info_tlv_decode (ndn_decoder_t *decoder, ndn_signature_t *signature)
 Decode an Signature info TLV block into an Signature structure. More...
 
int ndn_signature_value_tlv_decode (ndn_decoder_t *decoder, ndn_signature_t *signature)
 Decode an Signature value TLV block into an Signature structure. More...
 

Function Documentation

◆ ndn_signature_info_tlv_decode()

int ndn_signature_info_tlv_decode ( ndn_decoder_t decoder,
ndn_signature_t signature 
)

Decode an Signature info TLV block into an Signature structure.

This function will do memory copy.

Parameters
decoder.Input. The decoder who keeps the decoding result and the state.
signature.Output. The Signature structure whose signature info to be decoded.
Returns
0 if decoding is successful.

◆ ndn_signature_info_tlv_encode()

int ndn_signature_info_tlv_encode ( ndn_encoder_t encoder,
const ndn_signature_t signature 
)

Encode the Signature info into wire format (TLV block) from Signature structure.

Parameters
encoder.Output. The encoder who keeps the encoding result and the state.
signature.Input. The Signature structure whose signature info to be encoded.
Returns
0 if there is no error.

◆ ndn_signature_value_tlv_decode()

int ndn_signature_value_tlv_decode ( ndn_decoder_t decoder,
ndn_signature_t signature 
)

Decode an Signature value TLV block into an Signature structure.

This function will do memory copy.

Parameters
decoder.Input. The decoder who keeps the decoding result and the state.
signature.Output. The Signature structure whose signature value to be decoded.
Returns
0 if decoding is successful.

◆ ndn_signature_value_tlv_encode()

int ndn_signature_value_tlv_encode ( ndn_encoder_t encoder,
const ndn_signature_t signature 
)

Encode the Signature value into wire format (TLV block) from Signature structure.

Parameters
encoder.Output. The encoder who keeps the encoding result and the state.
signature.Input. The Signature structure whose signature value to be encoded.
Returns
0 if there is no error.