1
0
mirror of https://github.com/smallstep/cli.git synced 2025-08-09 03:22:43 +03:00

Move random utilities to crypto/randutil package.

This commit is contained in:
Mariano Cano
2018-07-19 14:56:36 -07:00
parent 27c1246c4c
commit 38b40b83cb
6 changed files with 13 additions and 13 deletions

View File

@@ -19,7 +19,7 @@ import (
"github.com/urfave/cli"
"github.com/smallstep/cli/command"
"github.com/smallstep/cli/crypto"
"github.com/smallstep/cli/crypto/randutil"
"github.com/smallstep/cli/errs"
"github.com/smallstep/cli/exec"
jose "gopkg.in/square/go-jose.v2"
@@ -282,12 +282,12 @@ type oauth struct {
}
func newOauth(provider, clientID, clientSecret, authzEp, tokenEp, scope, loginHint string) (*oauth, error) {
state, err := crypto.GenerateRandomRestrictedString(32)
state, err := randutil.GenerateRandomRestrictedString(32)
if err != nil {
return nil, err
}
challenge, err := crypto.GenerateRandomRestrictedString(64)
challenge, err := randutil.GenerateRandomRestrictedString(64)
if err != nil {
return nil, err
}