alexedwards / argon2id

Argon2id password hashing and verification for Go
MIT License
452 stars 44 forks source link

CreateHash and others should provide byte variants #26

Open mitar opened 8 months ago

mitar commented 8 months ago

I have my password already as []byte. It feels to me a bit silly to have to convert it to string just that then CreateHash calls converts it back to []byte again.

Should this package provider byte variants of CreateHash and others? It has been recently tagged 1.0.0 so probably it is too late to change this now in existing functions.

mitar commented 8 months ago

Oh, that could be done with generics probably in a backwards compatible way. And most of the time Go runtime would just detect the correct type.

mitar commented 7 months ago

Another issue with string is that strings are immutable, so it is tricky to wipe them from memory. See here for more information.