bc-csharp
bc-csharp copied to clipboard
[Argon2] Use marshalling to avoid copies on little endian platforms
Describe your changes
Use Span and marshalling when available to avoid copies when dealing with bytes[] and ulong[] arrays in Argon2. Followup of https://github.com/bcgit/bc-csharp/pull/559
How has this been tested?
Using the already present Argon2 test suites. I've tested it on net461 and net6.0
Checklist before requesting a review
- [x] I have performed a self-review of my code
- [x] I have kept the patch limited to only change the parts related to the patch
- [ ] This change requires a documentation update
See also Contributing Guidelines.
@peterdettman Here's the second part of my Argon2 optimisations!
Merged, thanks for the PR.