HashHelper.GenerateSalt Method

Namespace:
Weavy.Core.Helpers
Assembly:
Weavy.Core.dll

GenerateSalt(int)

Generates a cryptographically strong sequence of random byte values.

Due to base-64 encoding, the returned string will contain more characters than the number of bytes requested.

public static string GenerateSalt(int byteLength = 16)

Parameters

byteLength
int

The number of cryptographically random bytes to generate.

Returns

string

The generated salt value as a base-64-encoded string.