ektrah/libsodium-core

SodiumCore.Init not called, performance degraded

Closed this issue · 1 comments

I recently ran into a performance issue whereby PasswordHash.ArgonHashStringVerify would perform at roughly half the speed, unless PasswordHash.ArgonHashString was called first.
The reason appears to be that ArgonHashString calls SodiumCore.Init (which in turn calls SodiumLibrary.sodium_init), but ArgonHashStringVerify does not.
The libsodium documentation indicates that sodium_init should be called before any other operation (I'm surprised that it works without this call).
Can we consider calling this in ArgonHashStringVerify?

Resolved by #41