(text []byte)
| 12 | return []byte(base64.StdEncoding.EncodeToString(k[:])), nil |
| 13 | } |
| 14 | func (k *NyPrivateKey) UnmarshalText(text []byte) error { |
| 15 | data, err := base64.StdEncoding.DecodeString(string(text)) |
| 16 | if err != nil { |
| 17 | return fmt.Errorf("failed to decode private key: %w", err) |
| 18 | } |
| 19 | *k = NyPrivateKey(data) |
| 20 | return nil |
| 21 | } |
| 22 | func (k *NyPublicKey) UnmarshalText(text []byte) error { |
| 23 | data, err := base64.StdEncoding.DecodeString(string(text)) |
| 24 | if err != nil { |