Open KEINOS opened 2 months ago
Currently, exporting the generated Key object in PEM format supports the least fields by default.
func
For the future usage (such as ECDH support, #37), PEM key may require additional fields. Context or protocol versions for example.
- func (k *Key) PEM() (string, error) + func (k *Key) PEM[T string|int](optField ...[string]T) (string, error)
We need to be careful implementing this.
Including custom fields (headers) to PEM is easy, but reading the PEM file and generate a new Key object will not include those customized fields.
Currently, exporting the generated Key object in PEM format supports the least fields by default.
func
(k *Key) PEM() (string, error)For the future usage (such as ECDH support, #37), PEM key may require additional fields. Context or protocol versions for example.