mirror of
https://github.com/logos-messaging/go-noise.git
synced 2026-01-22 06:43:08 +00:00
Compare commits
No commits in common. "master" and "v0.0.3" have entirely different histories.
6
noise.go
6
noise.go
@ -67,10 +67,8 @@ func (c *CipherState) hasKey() bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (cs *CipherState) nonce() []byte {
|
func (cs *CipherState) nonce() []byte {
|
||||||
// RFC7539 specifies 12 bytes for nonce.
|
var nonceBytes [12]byte // RFC7539 specifies 12 bytes for nonce.
|
||||||
// TODO: extract this to function setup when creating handshake pattern
|
binary.BigEndian.PutUint64(nonceBytes[4:], cs.n)
|
||||||
var nonceBytes [12]byte
|
|
||||||
binary.LittleEndian.PutUint64(nonceBytes[4:], cs.n)
|
|
||||||
return nonceBytes[:]
|
return nonceBytes[:]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user