utilities

package
v0.0.0-...-d9996d1 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Base16Decode

func Base16Decode(encoded string) []byte

This function decodes the specified base 16 encoded string into its corresponding decoded bytes.

func Base16Encode

func Base16Encode(bytes []byte) string

This function encodes the specified bytes as a base 16 encoded string using standard base 16 encoding with no padding.

func Base32Decode

func Base32Decode(encoded string) []byte

This function decodes the specified base 32 string into its corresponding bytes.

func Base32Encode

func Base32Encode(bytes []byte) string

This function encodes the specified bytes as a base 32 string using the ten digits and all UPPER CASE letters except 'E', 'I', 'O', and 'U'.

func Base64Decode

func Base64Decode(encoded string) []byte

This function decodes the specified base 64 encoded string into its corresponding decoded bytes.

func Base64Encode

func Base64Encode(bytes []byte) string

This function encodes the specified bytes as a base 64 encoded string using standard base 64 encoding with no padding.

func RandomBoolean

func RandomBoolean() bool

This function generates a cryptographically secure random boolean.

func RandomBytes

func RandomBytes(size int) []byte

This function generates a cryptographically secure array of random bytes.

func RandomInteger

func RandomInteger(max int) int

This function generates a cryptographically secure random integer in the range [0..max].

func RandomProbability

func RandomProbability() float64

This function generates a cryptographically secure random probability in the range [0..1].

Types

This section is empty.

Jump to

Keyboard shortcuts

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