emilbayes / noise-protocol

Javascript implementation of the Noise Protocol Framework based on libsodium
ISC License
66 stars 17 forks source link

destroy for static keys #2

Closed emilbayes closed 6 years ago

emilbayes commented 6 years ago

Destroy clears out all key material, but the constructor currently just takes a reference to keys. This means that static keys can be inadvertently cleared. Either they shouldn't be cleared or the keys should be copied. Both have pros and cons

emilbayes commented 6 years ago

Key material is now copied as noted in the readme