GenerateSalt(int, SaltRevision)

Generate a salt for use with the Redakt.Utilities.BCrypt.HashPassword method.

public static string GenerateSalt(int workFactor, SaltRevision saltSaltRevision = 2)
Returns:
string

Parameters

workFactor int

The log2 of the number of rounds of hashing to apply - the work factor therefore increases as 2**workFactor.

saltSaltRevision SaltRevision

The revision to return in the salt portion, defaults to 2b

GenerateSalt(SaltRevision)

Generate a salt for use with the Redakt.Utilities.BCrypt.HashPassword method selecting a reasonable default for the number of hashing rounds to apply.

public static string GenerateSalt(SaltRevision saltSaltRevision = 2)
Returns:
string

Parameters

saltSaltRevision SaltRevision

The revision to return in the salt portion, defaults to 2b

In this article