microsoft / security-utilities

Security utilities for key generation, string redaction, etc.
MIT License
24 stars 9 forks source link

Rust/Marvin: add slice-only functions #73

Closed jdraaijer-microsoft closed 1 month ago

jdraaijer-microsoft commented 2 months ago

Instead of re-using the offset/length arguments, we can simply construct a slice and operate on that, making the code a lot more concise and 20% faster.

Also increased test coverage to test non-default offsets and lengths for correct output.

The first commit adds only the slice methods & equality tests, the second one modifies the tests more extensively.

Benchmark