Closed LegNeato closed 2 years ago
It's unsafe because it doesn't verify the signature. Renaming it would be a breaking change though and unlikely to happen anytime soon. If you have a better name for it though, I can change it when the next major version happens.
Totally get it, but it isn't unsafe in the traditional Rust memory-safety sense. My suggestion as stated above to to replace "unsafe" with "insecure". If you agree it is a change you want, I can add a function named dangerous_insecure_decode
and make the existing dangerous_unsafe_decode
function #[deprecated(note = "Please use the dangerous_insecure_decode function instead"]
.
Then you can remove at the next major rev / at your leisure.
I like insecure!
If anyone is up for a PR, I'll merge it otherwise that will be in a few days.
Thank you for this library! Would you consider renaming
dangerous_unsafe_decode
todangerous_insecure_decode
? "unsafe" has a specific meaning in Rust and it might be best not to overload it (it doesn't look like the implementation usesunsafe
at a quick glance).If you are interested, happy to put up a patch. If not, feel free to close!