mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-15 14:56:42 +00:00
GODT-1609: Fix bridge password encoding
This commit is contained in:
@ -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))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user