Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Argon2IDPasswordHash ¶
func Argon2IDPasswordHash(plain string, conf Argon2idConfig) (string, error)
func Argon2IDPasswordVerify ¶
func BytesToString ¶
func MarshalED25519PrivateKey ¶
func MarshalED25519PrivateKey(key ed25519.PrivateKey) []byte
MarshalED25519PrivateKey writes ed25519 private keys into the new OpenSSH private key format. I have no idea why this isn't implemented anywhere yet, you can do seemingly everything except write it to disk in the OpenSSH private key format. taken from https://github.com/mikesmitty/edkey/blob/master/edkey.go
func MercuryInRetrograde ¶
Types ¶
type Argon2idConfig ¶
type Argon2idConfig struct { Memory uint32 // KiB - main "knob" to turn for more expensive hashes Iterations uint32 // if memory cant go higher, iterations should, to compensate Parallelism uint8 // used to spread the load across multiple CPU threads (if used, iterations should be increased) SaltLen uint32 // bytes KeyLen uint32 // bytes }
Argon2idConfig provides an easier structure for Argon2id password hashing.
The main gist (not 100% accurate, but close enough) is: complexity = memory * iterations / parallelism.
func DefaultArgon2idConf ¶
func DefaultArgon2idConf() Argon2idConfig
DefaultArgon2idConf provides standard sane parameters chosen to not overload the parser service.
Click to show internal directories.
Click to hide internal directories.