Files
wireguard-go/src/keypair.go
T

22 lines
293 B
Go
Raw Normal View History

2017-06-24 15:34:17 +02:00
package main
import (
"crypto/cipher"
2017-06-26 13:14:02 +02:00
"sync"
2017-06-24 15:34:17 +02:00
)
type KeyPair struct {
2017-06-24 22:03:52 +02:00
recv cipher.AEAD
2017-06-26 13:14:02 +02:00
recvNonce uint64
2017-06-24 22:03:52 +02:00
send cipher.AEAD
2017-06-26 13:14:02 +02:00
sendNonce uint64
}
type KeyPairs struct {
mutex sync.RWMutex
current *KeyPair
previous *KeyPair
next *KeyPair
newKeyPair chan bool
2017-06-24 15:34:17 +02:00
}