GODT-1609: Fix bridge password encoding

This commit is contained in:
James Houlahan
2022-10-04 17:50:44 +02:00
parent 51633e000b
commit 6ac68984f2
9 changed files with 23 additions and 10 deletions

View File

@ -1,6 +1,8 @@
package vault
import (
"encoding/hex"
"github.com/ProtonMail/gopenpgp/v2/crypto"
)
@ -16,3 +18,12 @@ func newRandomToken(size int) []byte {
return token
}
func newRandomString(size int) []byte {
token, err := RandomToken(size)
if err != nil {
panic(err)
}
return []byte(hex.EncodeToString(token))
}