summaryrefslogtreecommitdiffhomepage
path: root/src/keypair.go
diff options
context:
space:
mode:
authorMathias Hall-Andersen <mathias@hall-andersen.dk>2017-08-14 17:09:25 +0200
committerMathias Hall-Andersen <mathias@hall-andersen.dk>2017-08-14 17:09:25 +0200
commit12e8db20662191baa8c7253804f1340d7e4d8a87 (patch)
tree700891f3e26e1eed8f2fd087151d79090b2848c7 /src/keypair.go
parenta4eff12d7f749c992247579161c4ce9e60e2df47 (diff)
Improved cookie/mac computation code
Diffstat (limited to 'src/keypair.go')
-rw-r--r--src/keypair.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/keypair.go b/src/keypair.go
index b5f46df..ba9c437 100644
--- a/src/keypair.go
+++ b/src/keypair.go
@@ -29,3 +29,9 @@ func (kp *KeyPairs) Current() *KeyPair {
defer kp.mutex.RUnlock()
return kp.current
}
+
+func (device *Device) DeleteKeyPair(key *KeyPair) {
+ key.send = nil
+ key.receive = nil
+ device.indices.Delete(key.localIndex)
+}