MCPcopy
hub / github.com/sniptt-official/ots / ExtractNonce

Method ExtractNonce

crypto/encrypt/encrypt.go:75–77  ·  view source on GitHub ↗

ExtractNonce returns the nonce from the ciphertext where it was prepended

()

Source from the content-addressed store, hash-verified

73
74// ExtractNonce returns the nonce from the ciphertext where it was prepended
75func (e EncryptedBytes) ExtractNonce() []byte {
76 return e.Ciphertext[:len(e.Nonce)]
77}
78
79// CiphertextWithoutNonce returns the ciphertext without the prepended nonce
80func (e EncryptedBytes) CiphertextWithoutNonce() []byte {

Callers 1

TestBytesFunction · 0.80

Calls

no outgoing calls

Tested by 1

TestBytesFunction · 0.64