wireguard-go-awg2-lx/src/keypair.go
2017-06-26 13:14:02 +02:00

21 lines
293 B
Go

package main
import (
"crypto/cipher"
"sync"
)
type KeyPair struct {
recv cipher.AEAD
recvNonce uint64
send cipher.AEAD
sendNonce uint64
}
type KeyPairs struct {
mutex sync.RWMutex
current *KeyPair
previous *KeyPair
next *KeyPair
newKeyPair chan bool
}