payload

package
v0.2.2-alpha Latest Latest
Warning

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

Go to latest
Published: May 10, 2023 License: Apache-2.0 Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateUnpaddedSize

func CalculateUnpaddedSize(p *loadtime.Payload) (int, error)

CalculateUnpaddedSize calculates the size of the passed in payload for the purpose of determining how much padding to add to reach the target size. CalculateUnpaddedSize returns an error if the payload Padding field is longer than 1.

func FromBytes

func FromBytes(b []byte) (*loadtime.Payload, error)

FromBytes extracts a paylod from the byte representation of the payload. FromBytes leaves the padding untouched, returning it to the caller to handle or discard per their preference.

func MaxUnpaddedSize

func MaxUnpaddedSize() (int, error)

MaxUnpaddedSize returns the maximum size that a payload may be if no padding is included.

func NewBytes

func NewBytes(p *loadtime.Payload) ([]byte, error)

NewBytes generates a new payload and returns the encoded representation of the payload as a slice of bytes. NewBytes uses the fields on the Options to create the payload.

Types

This section is empty.

Jump to

Keyboard shortcuts

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