microsoft / security-utilities

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

Rust/Marvin: add slice-only functions #70

Closed jdraaijer-microsoft closed 3 months ago

jdraaijer-microsoft commented 3 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 about 33% 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

jdraaijer-microsoft commented 3 months ago

Closing in favor of #73