docstore/pkg/cmd/helper.go
2021-02-18 22:52:36 +01:00

14 lines
219 B
Go

// Copyright (C) 2021 Marius Schellenberger
package cmd
import (
"crypto/rand"
"encoding/hex"
)
func password() (string, error) {
b := make([]byte, 16)
_, err := rand.Read(b)
return hex.EncodeToString(b), err
}