ParseNodePublicUntyped parses an untyped 64-character hex value as a NodePublic. Deprecated: this function is risky to use, because it cannot verify that the hex string was intended to be a NodePublic. This can lead to accidentally decoding one type of key as another. For new uses that don't requir
(raw mem.RO)
| 192 | // uses that don't require backwards compatibility with the untyped |
| 193 | // string format, please use MarshalText/UnmarshalText. |
| 194 | func ParseNodePublicUntyped(raw mem.RO) (NodePublic, error) { |
| 195 | var ret NodePublic |
| 196 | if err := parseHex(ret.k[:], raw, mem.B(nil)); err != nil { |
| 197 | return NodePublic{}, err |
| 198 | } |
| 199 | return ret, nil |
| 200 | } |
| 201 | |
| 202 | // NodePublicFromRaw32 parses a 32-byte raw value as a NodePublic. |
| 203 | // |
searching dependent graphs…