This mdArgon2.bas module implements Argon2 memory-hard function for password hashing. Argon2 depends on BLAKE2b so you'll need to include mdBlake2b.bas module before using current Argon2 module.

You can use CryptoArgon2KdfByteArray and CryptoArgon2KdfText functions for data-independent memory access Argon2i mode while CryptoArgon2IdKdfByteArray and CryptoArgon2IdKdfText function implement Argon2id mode.

Use Argon2id default (hybrid) mode if you don't need other modes as this is recommended in Argon2's RFC 9106.

Code:
'--- mdArgon2.bas
Option Explicit
DefObj A-Z

' Too long to post here
cheers,
</wqw>