gen_signature

package
v1.5.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 30, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Code generated by ndn tlv codegen DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type T1

type T1 struct {
	//+field:natural
	H1 uint64 `tlv:"0x01"`

	//+field:natural:optional
	H2 optional.Optional[uint64] `tlv:"0x02"`
	//+field:wire
	C enc.Wire `tlv:"0x03"`
	//+field:signature:sigCoverStart:sigCovered
	Sig enc.Wire `tlv:"0x04"`

	//+field:natural:optional
	H3 optional.Optional[uint64] `tlv:"0x06"`
	// contains filtered or unexported fields
}

+tlv-model:nocopy,private,ordered

func ReadT1

func ReadT1(reader enc.WireView) (*T1, enc.Wire, error)

(AI GENERATED DESCRIPTION): Parses a T1 packet from the given WireView, returning the parsed T1 object and the signature‑covered portion of the packet.

func (*T1) Encode

func (v *T1) Encode(estLen uint, value []byte) (enc.Wire, enc.Wire)

(AI GENERATED DESCRIPTION): Encodes a T1 packet, inserting the provided signature value into the encoded wire and updating its length field, and returns the full encoded wire along with the sub‑wire that the signature covers.

type T1Encoder

type T1Encoder struct {
	Length uint

	C_length    uint
	Sig_wireIdx int
	Sig_estLen  uint
	// contains filtered or unexported fields
}

func (*T1Encoder) Encode

func (encoder *T1Encoder) Encode(value *T1) enc.Wire

func (*T1Encoder) EncodeInto

func (encoder *T1Encoder) EncodeInto(value *T1, wire enc.Wire)

func (*T1Encoder) Init

func (encoder *T1Encoder) Init(value *T1)

type T1ParsingContext

type T1ParsingContext struct {
	// contains filtered or unexported fields
}

func (*T1ParsingContext) Init

func (context *T1ParsingContext) Init()

func (*T1ParsingContext) Parse

func (context *T1ParsingContext) Parse(reader enc.WireView, ignoreCritical bool) (*T1, error)

type T2

type T2 struct {
	//+field:interestName:sigCovered
	Name enc.Name `tlv:"0x01"`

	//+field:wire
	C enc.Wire `tlv:"0x03"`
	//+field:signature:sigCoverStart:sigCovered
	Sig enc.Wire `tlv:"0x04"`
	// contains filtered or unexported fields
}

+tlv-model:nocopy,private,ordered

func ReadT2

func ReadT2(reader enc.WireView, digestRequired bool) (*T2, enc.Wire, error)

(AI GENERATED DESCRIPTION): Parses a T2 packet from a wire view, optionally verifies that its last name component is the correct SHA‑256 digest of the signed data, and returns the parsed packet together with the signed portion of the packet.

func (*T2) Encode

func (v *T2) Encode(estLen uint, value []byte, needDigest bool) (enc.Wire, enc.Wire)

(AI GENERATED DESCRIPTION): Encodes a T2 object into its binary wire format, inserting the supplied signature (if any) and, when requested, computing a SHA‑256 digest over the designated packet portion and embedding that digest into the name component.

type T2Encoder

type T2Encoder struct {
	Length uint

	Name_length     uint
	Name_needDigest bool
	Name_wireIdx    int
	Name_pos        uint

	C_length    uint
	Sig_wireIdx int
	Sig_estLen  uint
	// contains filtered or unexported fields
}

func (*T2Encoder) Encode

func (encoder *T2Encoder) Encode(value *T2) enc.Wire

func (*T2Encoder) EncodeInto

func (encoder *T2Encoder) EncodeInto(value *T2, wire enc.Wire)

func (*T2Encoder) Init

func (encoder *T2Encoder) Init(value *T2)

type T2ParsingContext

type T2ParsingContext struct {
	Name_wireIdx int
	Name_pos     uint
	// contains filtered or unexported fields
}

func (*T2ParsingContext) Init

func (context *T2ParsingContext) Init()

func (*T2ParsingContext) Parse

func (context *T2ParsingContext) Parse(reader enc.WireView, ignoreCritical bool) (*T2, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL