signature

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SIGNATURE_LEN constant
	SIGNATURE_LEN = 13
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Signature

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

Signature type

func New

func New(linkID byte, timestamp time.Time, secret [32]byte, packet []byte) (*Signature, error)

New returns new Signature struct instance

func (*Signature) CRC

func (s *Signature) CRC() (crc [6]byte)

Signature returns signature slice

func (*Signature) Copy

func (s *Signature) Copy() *Signature

Copy returns copy of Signature struct instance

func (*Signature) LinkID

func (s *Signature) LinkID() byte

LinkID returns link id

func (*Signature) Marshal

func (s *Signature) Marshal() ([]byte, error)

Marshal returns serialized bytes from Signature struct

func (Signature) String

func (s Signature) String() string

String function return string view of Packet struct

func (*Signature) Timestamp

func (s *Signature) Timestamp() time.Time

Timestamp returns timestamp of signature

func (*Signature) Unmarshal

func (s *Signature) Unmarshal(buffer []byte) error

Unmarshal returns de-serialized bytes to Signature struct

Jump to

Keyboard shortcuts

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