When serializing, a byte array is used from the PublicKey::serialize method.
Then when deserializing, the attempt is made by default to deserialize directly into a PublicKey instead of calling the corresponding PublicKey::parse_slice function.
Additionally, bincode serialization isn't covered in the tests.
Therefore, this PR does the following:
Implement and use a new PublicKeyBytesVisitor for deserializing bytes to a PublicKey (Closes #97).
Add a test to cover bincode serialization / deserialization.
Return the base64 decoding error instead of unwrapping (Closes #105).
Currently, the current bincode de/serialization has a bug:
PublicKey::serialize
method.PublicKey
instead of calling the correspondingPublicKey::parse_slice
function.Additionally, bincode serialization isn't covered in the tests.
Therefore, this PR does the following: