mirror of
https://github.com/rwinkhart/go-boilerplate.git
synced 2026-09-04 08:07:17 -04:00
Add secure byte slice erase helper; add alternative input methods for Windows
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
package back
|
||||
|
||||
// EraseBytesSecurely overwrites all
|
||||
// bytes in a slice with zeros.
|
||||
func EraseBytesSecurely(input []byte) {
|
||||
for i := range input {
|
||||
input[i] = 0
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user