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

Method UnmarshalBinary

crypto/asymmetric/keypair.go:71–83  ·  view source on GitHub ↗

UnmarshalBinary does the deserialization.

(keyBytes []byte)

Source from the content-addressed store, hash-verified

69
70// UnmarshalBinary does the deserialization.
71func (k *PublicKey) UnmarshalBinary(keyBytes []byte) (err error) {
72 pubKeyI, ok := parsedPublicKeyCache.Load(string(keyBytes))
73 if ok {
74 *k = *pubKeyI.(*PublicKey)
75 } else {
76 pubNew, err := ParsePubKey(keyBytes)
77 if err == nil {
78 *k = *pubNew
79 parsedPublicKeyCache.Store(string(keyBytes), pubNew)
80 }
81 }
82 return
83}
84
85// MarshalYAML implements the yaml.Marshaler interface.
86func (k PublicKey) MarshalYAML() (interface{}, error) {

Callers 6

UnmarshalYAMLMethod · 0.95
GetBPFromDNSSeedMethod · 0.95
TestIPv6SeedFunction · 0.95
TestConfFunction · 0.45

Calls 1

ParsePubKeyFunction · 0.85

Tested by 4

TestIPv6SeedFunction · 0.76
TestConfFunction · 0.36