RustCrypto / utils

Utility crates used in RustCrypto
428 stars 127 forks source link

hybrid-array: get rid of `check_slice_length` #1020

Closed tarcieri closed 8 months ago

tarcieri commented 8 months ago

It was a hack.

Instead, leverages the TryFrom reference conversion to a core array to check the length, then casts from a core array reference.

This requires a few more bounds, but they shouldn't be problematic in practice.