e-CryptIt Engine Xojo Plugin |
|
EinhugurBCrypt Class (console safe)
The Bcrypt hashing function allows us to build a password security platform that scales with computation power and always hashes every password with a salt.
Bcrypt is meant to require computing power (cost) to defend against brute force attacks.
This cost is also known as the work factor. It is recommended as a common rule of thumb for work factor setting to tune the cost so that the function runs as slow as possible without affecting the users experience and without increasing the need to use additional hardware that may be over budget.
Normal usage flow would be something like:1. Password for user is created.
2. The password gets Hashed with Bcrypt using the Hash function.
3. Hash gets stored.
4. When user wants to log in then he enters his password.
5. Password is validated against the stored Bcrypt hash using the VerifyToken function.
Object
EinhugurBCrypt
class EinhugurBCrypt
Methods
shared GenerateSalt | Generates salt with given amount of rounds / cost. |
shared Hash | Hashes the token / password, taking in number of rounds (cost), so that salt can be generated internally on the fly. |
shared Hash | Hashes the token / password with a salt that has been generated with the GenerateSalt routine or obtained from external source. |
shared HashTask | Creates task object to hash the token / password, taking in number of rounds (cost), so that salt can be generated internally on the fly. |
shared HashTask | Creates task object to hash the token / password with a salt that has been generated with the GenerateSalt routine or obtained from external source. |
shared VerifyToken | Verifies token or password against given hash, returning true if it was a match, else false. |
shared VerifyTokenTask | Creates long running task object to verify token or password against given hash, returning true if it was a match, else false. |
Constants
Version = 16.12 | |
Supported Platforms:
macOS Intel 64 bitmacOS Apple SiliconWindows 32 bitWindows 64 bitWindows ARM 64 bitLinux 32 bitLinux 64 bitLinux ARM 32 bitLinux ARM 64 bitiOS