keepsimple1 / libaes

A small and fast AES cipher in safe Rust
Apache License 2.0
25 stars 1 forks source link

handle error with invalid keys #10

Closed keepsimple1 closed 3 years ago

keepsimple1 commented 3 years ago

WARN: API change involved.

I found that with invalid keys, the cbc_decrypt can panic. After some research, I think it is better to return an error gracefully than doing the panic.

So the changes are: