public/unlock-store: idempotent call for passphrases

This allows the user to call it even after the store has been unlock in
order to get the admin token.
This commit is contained in:
Mikaël Cluseau
2023-11-09 08:59:27 +01:00
parent efa6193954
commit 40d08139db
3 changed files with 27 additions and 1 deletions

View File

@ -1,5 +1,7 @@
package secretstore
func Memzero(ba []byte) { memzero(ba) }
func memzero(ba []byte) {
for i := range ba {
ba[i] = 0