1
0
Fork 0
forked from External/ergo

update resume support to draft/resume-0.3

This commit is contained in:
Shivaram Lingamneni 2019-02-12 00:27:57 -05:00
parent cf2445abe7
commit afe94d43c3
10 changed files with 121 additions and 47 deletions

View file

@ -14,6 +14,10 @@ var (
b32encoder = base32.NewEncoding("abcdefghijklmnopqrstuvwxyz234567").WithPadding(base32.NoPadding)
)
const (
SecretTokenLength = 26
)
// generate a secret token that cannot be brute-forced via online attacks
func GenerateSecretToken() string {
// 128 bits of entropy are enough to resist any online attack: