forked from TrueCloudLab/frostfs-sdk-go
[#199] owner: Rename to user
, refactor and doc
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
d20999113a
commit
1ed426b8a6
36 changed files with 546 additions and 557 deletions
12
user/util.go
Normal file
12
user/util.go
Normal file
|
@ -0,0 +1,12 @@
|
|||
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())
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue