GenerateBCryptSalt

From GT-MP
Jump to: navigation, search
GenerateBCryptSalt
Server-Side Function
Utilities-terminal.png Server-Side Csharp.png C#

Generates a salt for use with the getPasswordHashBCrypt method.

Syntax

string API.generateBCryptSalt();
string API.generateBCryptSalt(int workFactor);

Required Arguments

- Overload 2:

  • workFactor: log2 of the number of rounds of hashing to apply in int type.

NOTE: This function returns a base64 encoded salt in string type

Usage example(s)

API.generateBCryptSalt();
API.generateBCryptSalt(int workFactor);

References