purchase

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2023 License: Unlicense Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MagicString = "pc"
	Len         = magicbytes.Len + slice.Uint64Len + sha256.Len*3 +
		nonce.IVLen*3 + nonce.IDLen
)

Variables

View Source
var (
	Magic = slice.Bytes(MagicString)
)

Functions

This section is empty.

Types

type OnionSkin

type OnionSkin struct {
	nonce.ID
	NBytes uint64
	// Ciphers is a set of 3 symmetric ciphers that are to be used in their
	// given order over the reply message from the service.
	Ciphers [3]sha256.Hash
	// Nonces are the nonces to use with the cipher when creating the
	// encryption for the reply message.
	Nonces [3]nonce.IV
	types.Onion
}

OnionSkin purchase is a message that requests a session key, which will activate when a payment for it has been done, or it will time out after some period to allow unused codes to be flushed.

func (*OnionSkin) Decode

func (x *OnionSkin) Decode(b slice.Bytes, c *slice.Cursor) (e error)

func (*OnionSkin) Encode

func (x *OnionSkin) Encode(b slice.Bytes, c *slice.Cursor)

func (*OnionSkin) Inner

func (x *OnionSkin) Inner() types.Onion

func (*OnionSkin) Insert

func (x *OnionSkin) Insert(o types.Onion)

func (*OnionSkin) Len

func (x *OnionSkin) Len() int

Jump to

Keyboard shortcuts

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