tiny simplifying refactor
This commit is contained in:
1 parent
b74348e59d
commit
e45ea65e45
1 file changed
+2
-3
+2
-3
@@ -51,9 +51,8 @@ func DecryptPrefixNonce(ciphertxt []byte, secret *[32]byte) ([]byte, bool) {
|
|||||||
return nil, false
|
return nil, false
|
||||||
}
|
}
|
||||||
var nonce [24]byte
|
var nonce [24]byte
|
||||||
copy(nonce[:], ciphertxt[0:24])
|
copy(nonce[:], ciphertxt[:24])
|
||||||
ciphertxt = ciphertxt[24:]
|
return secretbox.Open(nil, ciphertxt[24:], &nonce, secret)
|
||||||
return secretbox.Open(nil, ciphertxt, &nonce, secret)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func SetNonceLow15Bits(nonce *[24]byte, offset uint16) {
|
func SetNonceLow15Bits(nonce *[24]byte, offset uint16) {
|
||||||
|
|||||||
Reference in new issue
Block a user