Platforms to show: All Mac Windows Linux Cross-Platform

Back to Argon2MBS class.

Argon2MBS.Calc(type as Integer = 0) as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Encryption and Hash MBS Encryption Plugin 16.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Function that performs memory-hard hashing with certain degree of parallelism.
Example
dim a as new Argon2MBS

a.OutputLength = 24
a.Password = "password"
a.Salt = "somesalt"
a.cost = 2
a.MemoryCost = 65536 // 64 Megabytes
a.Lanes = 4
a.Threads = 4

dim hash as string = a.Calc(a.kTypeI)
dim t as string = EncodeHex(hash)

if t = "45d7ac72e76f242b20b77b9bf9bf9d5915894e669a24e6c6" then
// ok
else
Break // failed
end if

Returns hash on success or empty string in case of error.
Lasterror is set.

Argon2MBS.Constructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Encryption and Hash MBS Encryption Plugin 16.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The constructor.

Argon2MBS.Destructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Encryption and Hash MBS Encryption Plugin 16.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Destructor.

Argon2MBS.Verify(Hash as String, type as Integer = 0) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Encryption and Hash MBS Encryption Plugin 16.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Verifies a password hash.
Example
dim a as new Argon2MBS

a.OutputLength = 24
a.Password = "password"
a.Salt = "somesalt"
a.cost = 2
a.MemoryCost = 65536
a.Lanes = 4
a.Threads = 4

dim h as string = DecodeHex("45d7ac72e76f242b20b77b9bf9bf9d5915894e669a24e6c6")
if a.Verify(h, a.kTypeI) then
// ok
break
else
// failed
break
end if

Returns true on success.
Lasterror is set.

The items on this page are in the following plugins: MBS Encryption Plugin.


The biggest plugin in space...