casting

package
v0.22.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ByteArray10

func ByteArray10() (*memguard.LockedBuffer, *[10]byte)

ByteArray10 allocates and returns a region of memory represented as a fixed-size 10 byte array.

func SecureStructArray

func SecureStructArray() (*memguard.LockedBuffer, *[2]Secure)

SecureStructArray allocates enough memory to hold an array of Secure structs and returns them.

func Uint64Array4

func Uint64Array4() (*memguard.LockedBuffer, *[4]uint64)

Uint64Array4 allocates a 32 byte memory region and returns it represented as a sequence of four unsigned 64 bit integer values.

Types

type Secure

type Secure struct {
	Key       [32]byte
	Salt      [2]uint64
	Counter   uint64
	Something bool
}

Secure is some generic example struct containing sensitive information.

func SecureStruct

func SecureStruct() (*memguard.LockedBuffer, *Secure)

SecureStruct allocates a region of memory the size of a struct type and returns a pointer to that memory represented as that struct type.

func SecureStructSlice

func SecureStructSlice(size int) (*memguard.LockedBuffer, []Secure)

SecureStructSlice takes a length and returns a slice of Secure struct values of that length.

Jump to

Keyboard shortcuts

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