Share via


Crypto.GenerateSalt(Int32) Method

Definition

Generates a cryptographically strong sequence of random byte values.

public static string GenerateSalt (int byteLength = 16);
static member GenerateSalt : int -> string
Public Shared Function GenerateSalt (Optional byteLength As Integer = 16) As String

Parameters

byteLength
Int32

The number of cryptographically random bytes to generate.

Returns

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

Applies to