MCPcopy Index your code
hub / github.com/syncthing/syncthing / randomNonce

Function randomNonce

lib/protocol/encryption.go:519–525  ·  view source on GitHub ↗

randomNonce is a normal, cryptographically random nonce

()

Source from the content-addressed store, hash-verified

517
518// randomNonce is a normal, cryptographically random nonce
519func randomNonce() *[nonceSize]byte {
520 var nonce [nonceSize]byte
521 if _, err := rand.Read(nonce[:]); err != nil {
522 panic("catastrophic randomness failure: " + err.Error())
523 }
524 return &nonce
525}
526
527// keysFromPasswords converts a set of folder ID to password into a set of
528// folder ID to encryption key, using our key derivation function.

Callers 1

encryptBytesFunction · 0.85

Calls 2

ReadFunction · 0.92
ErrorMethod · 0.65

Tested by

no test coverage detected