Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit changes the `Serializer` and `Deserializer` impls on the `PublicKey` type to work more like the ones on other types in this crate and its downstream dependencies: - Use binary DER serialization with binary formats (what it does today) - Use an upper-case hex serialization of the DER in conjunction with "human readable" formats Though richer formats exist for this use case (such as `JwkEcKey` which is an existing implementation of JWK), hex-serialized DER is relatively easy to work with, and can be decoded easily with online tools such as https://lapo.it/asn1js/ Note that the `Deserialize` impl for `PublicKey` never worked with human-readable formats as it was attempting to deserialize to `&[u8]`, which doesn't work with formats like JSON or TOML because they need an intermediate decoding step and therefore require deserialization to `Vec<u8>`. So this isn't a breaking change from the `Deserialize` side. Fixes RustCrypto/elliptic-curves#536
- Loading branch information