forked from TrueCloudLab/frostfs-sdk-go
1ed426b8a6
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
12 lines
271 B
Go
12 lines
271 B
Go
package user
|
|
|
|
import (
|
|
"crypto/ecdsa"
|
|
|
|
"github.com/nspcc-dev/neo-go/pkg/crypto/keys"
|
|
)
|
|
|
|
// IDFromKey forms the ID using script hash calculated for the given key.
|
|
func IDFromKey(id *ID, key ecdsa.PublicKey) {
|
|
id.SetScriptHash((*keys.PublicKey)(&key).GetScriptHash())
|
|
}
|