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

Method UnmarshalYAML

crypto/asymmetric/keypair.go:91–106  ·  view source on GitHub ↗

UnmarshalYAML implements the yaml.Unmarshaler interface.

(unmarshal func(interface{}) error)

Source from the content-addressed store, hash-verified

89
90// UnmarshalYAML implements the yaml.Unmarshaler interface.
91func (k *PublicKey) UnmarshalYAML(unmarshal func(interface{}) error) error {
92 var str string
93 if err := unmarshal(&str); err != nil {
94 return err
95 }
96
97 // load public key string
98 pubKeyBytes, err := hex.DecodeString(str)
99 if err != nil {
100 return err
101 }
102
103 err = k.UnmarshalBinary(pubKeyBytes)
104
105 return err
106}
107
108// IsEqual return true if two keys are equal.
109func (k *PublicKey) IsEqual(public *PublicKey) bool {

Callers

nothing calls this directly

Calls 1

UnmarshalBinaryMethod · 0.95

Tested by

no test coverage detected