git.frostfs.info/TrueCloudLab/frostfs-sdk-go@v0.0.0-20241022124111-5361f0ecebd3/user/util.go (about) 1 package user 2 3 import ( 4 "crypto/ecdsa" 5 6 "github.com/nspcc-dev/neo-go/pkg/crypto/keys" 7 ) 8 9 // IDFromKey forms the ID using script hash calculated for the given key. 10 func IDFromKey(id *ID, key ecdsa.PublicKey) { 11 id.SetScriptHash((*keys.PublicKey)(&key).GetScriptHash()) 12 }