awnumar / memguard

Secure software enclave for storage of sensitive information in memory.
Apache License 2.0
2.5k stars 123 forks source link

Replace WipeBytes with a Wipe method. #34

Closed awnumar closed 6 years ago

awnumar commented 6 years ago

Exposing a function for wiping ordinary slices implies that it holds some kind of guarantees. In reality, wiping an ordinary slice is next to useless, since you have no idea about any copies made or what the garbage collector has done.

Instead, to only allow wiping of secure LockedBuffers, we make the WipeBytes function internal and instead expose a Wipe method for LockedBuffers.