utils

package
v0.0.0-...-b7ec496 Latest Latest
Warning

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

Go to latest
Published: May 23, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func KeyFrom

func KeyFrom(pwrod []byte, insalt []byte) (key ed25519.PrivateKey, salt []byte, err error)

KeyFrom generates an ed25519 keypair from an input password by first hashing the input and then inputting the resulting hash into scrypt with recommended params. Finally, this scrypted key is used as the seed for an ed25519 key pair. Caller must store the salt in addition to the pwrod if it's needed

func RandomBytes

func RandomBytes(size int) (blk []byte, err error)

randomBytes returns up to <size> crypto-random bytes

func RandomUint64

func RandomUint64() (rnd uint64, err error)

RandomUint64 returns a crypto-random integer between 0 and the maximum possible unsigned 64 bit integer.

Types

This section is empty.

Jump to

Keyboard shortcuts

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