From 12e8db20662191baa8c7253804f1340d7e4d8a87 Mon Sep 17 00:00:00 2001 From: Mathias Hall-Andersen Date: Mon, 14 Aug 2017 17:09:25 +0200 Subject: Improved cookie/mac computation code --- src/keypair.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/keypair.go') 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) +} -- cgit v1.2.3