2022-04-11 06:30:22 +00:00
|
|
|
package usertest
|
|
|
|
|
|
|
|
import (
|
2023-03-07 11:20:03 +00:00
|
|
|
"git.frostfs.info/TrueCloudLab/frostfs-sdk-go/user"
|
2022-04-11 06:30:22 +00:00
|
|
|
"github.com/nspcc-dev/neo-go/pkg/crypto/keys"
|
|
|
|
)
|
|
|
|
|
|
|
|
// ID returns random user.ID.
|
2023-11-21 08:35:10 +00:00
|
|
|
func ID() user.ID {
|
2022-04-11 06:30:22 +00:00
|
|
|
key, err := keys.NewPrivateKey()
|
|
|
|
if err != nil {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
|
|
|
|
var x user.ID
|
|
|
|
user.IDFromKey(&x, key.PrivateKey.PublicKey)
|
|
|
|
|
2023-11-21 08:35:10 +00:00
|
|
|
return x
|
2022-04-11 06:30:22 +00:00
|
|
|
}
|