mirror of
https://github.com/rwinkhart/go-boilerplate.git
synced 2026-10-27 05:39:58 -04:00
Add secure byte slice erase helper; add alternative input methods for Windows
This commit is contained in:
1 parent
9ee213eeb4
commit
e1bb0012a7
6 files changed
+151
-25
No files matched your search
@@ -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