conv

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidBIP39Mnemonic = errors.New("invalid BIP-39 mnemonic")
	ErrBIP39Internal        = errors.New("BIP-39 internal error")
	ErrBech32               = errors.New("bech32 error")
	ErrInvalidAgeKeySize    = errors.New("invalid age key size")
)

Functions

func B64ToBytes

func B64ToBytes(s string) ([]byte, error)

B64ToBytes converst base64 string to bytes

func BytesToAgeIdentity

func BytesToAgeIdentity(raw []byte) (*age.X25519Identity, error)

BytesToAgeIdentity creates age identity from raw bytes

func BytesToB64

func BytesToB64(key []byte) string

BytesToB64 encodes to bytes to base64 string

func BytesToBIP39

func BytesToBIP39(raw []byte) (string, error)

BytesToBIP39 converts raw bytes to BIP39 mnemonic

func EcdsaKeyToBytes

func EcdsaKeyToBytes(key *ecdsa.PrivateKey) []byte

EcdsaKeyToBytes returns bytes of ECDSA private key

func RandomBytes

func RandomBytes(n int) ([]byte, error)

RandomBytes create n bytes using crypto/rand

Types

This section is empty.

Jump to

Keyboard shortcuts

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