MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / PubKeyHash

Function PubKeyHash

crypto/address.go:28–41  ·  view source on GitHub ↗

PubKeyHash generates the account hash address for specified public key.

(pubKey *asymmetric.PublicKey)

Source from the content-addressed store, hash-verified

26
27// PubKeyHash generates the account hash address for specified public key.
28func PubKeyHash(pubKey *asymmetric.PublicKey) (addr proto.AccountAddress, err error) {
29 if pubKey == nil {
30 err = errors.New("nil public key")
31 return
32 }
33 var enc []byte
34
35 if enc, err = pubKey.MarshalHash(); err != nil {
36 return
37 }
38
39 addr = proto.AccountAddress(hash.THashH(enc))
40 return
41}

Callers 15

TestChainFunction · 0.92
NewChainWithContextFunction · 0.92
transferAccountTokenMethod · 0.92
updateProviderListMethod · 0.92
updatePermissionMethod · 0.92
TestMetaStateFunction · 0.92
CreateFunction · 0.92
GetTokenBalanceFunction · 0.92
UpdatePermissionFunction · 0.92
TransferTokenFunction · 0.92

Calls 4

AccountAddressTypeAlias · 0.92
THashHFunction · 0.92
NewMethod · 0.65
MarshalHashMethod · 0.65

Tested by 12

TestChainFunction · 0.74
TestMetaStateFunction · 0.74
startTestServiceFunction · 0.74
TestCreateFunction · 0.74
TestIssueKeysFunction · 0.74
TestTxCreateDatabaseFunction · 0.74
TestNewBusServiceFunction · 0.74
TestDBMSFunction · 0.74
TestComputeMetricsFunction · 0.74
TestFullProcessFunction · 0.74