mirror of
https://github.com/Quad4-Software/Reticulum-Go
synced 2026-08-29 23:48:44 -04:00
14 lines
270 B
Go
14 lines
270 B
Go
// SPDX-License-Identifier: Apache-2.0
|
|
// Copyright (c) 2024-2026 Quad4.io
|
|
|
|
package securemem
|
|
|
|
import "runtime"
|
|
|
|
// WipeBytes overwrites b with zeros. Prefer for temporary key staging.
|
|
func WipeBytes(b []byte) {
|
|
for i := range b {
|
|
b[i] = 0
|
|
}
|
|
runtime.KeepAlive(b)
|
|
}
|