bc-csharp icon indicating copy to clipboard operation
bc-csharp copied to clipboard

[Argon2] Use marshalling to avoid copies on little endian platforms

Open zer0x64 opened this issue 1 year ago • 1 comments

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.

zer0x64 avatar Oct 07 '24 18:10 zer0x64

@peterdettman Here's the second part of my Argon2 optimisations!

zer0x64 avatar Oct 07 '24 18:10 zer0x64

Merged, thanks for the PR.

peterdettman avatar Nov 20 '24 14:11 peterdettman