mirror of
https://github.com/rwinkhart/go-boilerplate.git
synced 2026-09-01 22:57:23 -04:00
Harden functions that potentially deal with sensitive information
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
package security
|
||||
|
||||
// ZeroizeBytes overwrites all
|
||||
// bytes in a slice with zeros.
|
||||
func ZeroizeBytes(input []byte) {
|
||||
for i := range input {
|
||||
input[i] = 0
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user