SCryptGenerate Method

Generate a key using the scrypt key derivation function.

Definition

Namespace: Org.BouncyCastle.Crypto.Generators
Assembly: BouncyCastle.Cryptography (in BouncyCastle.Cryptography.dll) Version: 2.3.0-beta.187+d6da5648ae
public static byte[] Generate(
	byte[] P,
	byte[] S,
	int N,
	int r,
	int p,
	int dkLen
)

Parameters

P  Byte
the bytes of the pass phrase.
S  Byte
the salt to use for this invocation.
N  Int32
CPU/Memory cost parameter. Must be larger than 1, a power of 2 and less than
C#
2^(128 * r / 8)
.
r  Int32
the block size, must be >= 1.
p  Int32
Parallelization parameter. Must be a positive integer less than or equal to
C#
int.MaxValue / (128 * r * 8)
.
dkLen  Int32
the length of the key to generate.

Return Value

Byte
the generated key.

See Also