Documentation ¶
Index ¶
Constants ¶
View Source
const ( // KeyLength is the length of keys (in bytes). KeyLength = 32 // NonceLength is the the length of nonces (in bytes). NonceLength = 24 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Challenge ¶
Challenge represents something that can be solved and solutions can be checked against.
type Nonce ¶
type Nonce *[NonceLength]byte
Nonce represents a nonce.
func GenerateNonce ¶ added in v1.4.48
GenerateNonce generates a fixed number of random bytes.
func SolveChallenge ¶ added in v1.4.48
func SolveChallenge(challenge []byte, nonce Nonce, selfPriv PrivateKey, peerPub PublicKey) ([]byte, Nonce, error)
SolveChallenge attempts to solve a challenge with a given private key.
Click to show internal directories.
Click to hide internal directories.