BCrypt (1 Viewer)

nhorton79

Registered User.
Local time
Tomorrow, 03:58
Joined
Aug 17, 2015
Messages
147
Don't know whether this is of any interest for everyone in the forums, however, I have found this for hashing and verifying password hashes created using BCrypt.

https://github.com/as08/ClassicASP.Bcrypt
I was able to register the DLL to a TLB by navigating to C:\Windows\Microsoft.NET\Framework\v4.0.30319 and running the following command:

Code:
RegAsm path/to/dllfile/ClassicASP.Bcrypt.dll /tlb /codebase

From there, I could use this with late binding:
Code:
Dim Bcrypt As Object
Set Bcrypt = CreateObject("ClassicASP.Bcrypt")

Dim response

' Generate a hash with a default work factor of 10
response = Bcrypt.Hash("testpassword")
Debug.Print response

'' Verify a hash
response = Bcrypt.Verify("testpassword", "$2a$10$z7vfvfvHkOvJ6H1qMd8G9.kc38zptoqrqpsg/pwYTlmCd37OZ3sDK")
Debug.Print response


I was able to hash new passwords and verify existing hashed passwords made using the Node.js bcryptjs package.

I hope this helps someone else with the same problem.
 

561414

Active member
Local time
Today, 10:58
Joined
May 28, 2021
Messages
280
That's pretty useful. Bcrypt is standard in web dev, it would be nice if more developers adopted that in Access.
 

Users who are viewing this thread

Top Bottom