bytesutil

package
v0.0.42 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2024 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromBase64

func FromBase64(base64Str string) ([]byte, error)

FromBase64 decodes a base64-encoded string into a byte slice.

func FromGobInto added in v0.0.19

func FromGobInto(gobBytes []byte, dest any) error

FromGob decodes a gob-encoded byte slice into an arbitrary value.

func Random

func Random(byteLen int) ([]byte, error)

Random returns a slice of cryptographically random bytes of length byteLen.

func ToBase64

func ToBase64(bytes []byte) string

ToBase64 encodes a byte slice into a base64-encoded string.

func ToGob added in v0.0.19

func ToGob(src any) ([]byte, error)

ToGob encodes an arbitrary value into a gob-encoded byte slice.

Types

This section is empty.

Jump to

Keyboard shortcuts

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