forked from TrueCloudLab/frostfs-sdk-go
Alex Vanin
94476f9055
Due to source code relocation from GitHub. Signed-off-by: Alex Vanin <a.vanin@yadro.com>
19 lines
324 B
Go
19 lines
324 B
Go
package usertest
|
|
|
|
import (
|
|
"git.frostfs.info/TrueCloudLab/frostfs-sdk-go/user"
|
|
"github.com/nspcc-dev/neo-go/pkg/crypto/keys"
|
|
)
|
|
|
|
// ID returns random user.ID.
|
|
func ID() *user.ID {
|
|
key, err := keys.NewPrivateKey()
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
|
|
var x user.ID
|
|
user.IDFromKey(&x, key.PrivateKey.PublicKey)
|
|
|
|
return &x
|
|
}
|