dalek-cryptography / ed25519-dalek

Fast and efficient ed25519 signing and verification in Rust.
BSD 3-Clause "New" or "Revised" License
677 stars 222 forks source link

Improve diagnostics when key being deserialized is too long #294

Closed robjtede closed 1 year ago

robjtede commented 1 year ago

Previous error would simply say "trailing characters" which is correct, but we can do better by counting the remaining sequence elements and displaying a nicer error "invalid length N" where N > 32, same as N < 32.

rozbb commented 1 year ago

Thank you!