SCrypt.GetStream Method

CryptSharp

SCryptGetStream Method CryptSharp
Creates a derived key stream from which a derived key can be read.

Namespace: CryptSharp.Utility
Assembly: CryptSharp (in CryptSharp.dll) Version: 2.1.0.0
Syntax

public static Pbkdf2 GetStream(
	byte[] key,
	byte[] salt,
	int cost,
	int blockSize,
	int parallel,
	Nullable<int> maxThreads
)
Public Shared Function GetStream ( 
	key As Byte(),
	salt As Byte(),
	cost As Integer,
	blockSize As Integer,
	parallel As Integer,
	maxThreads As Nullable(Of Integer)
) As Pbkdf2
public:
static Pbkdf2^ GetStream(
	array<unsigned char>^ key, 
	array<unsigned char>^ salt, 
	int cost, 
	int blockSize, 
	int parallel, 
	Nullable<int> maxThreads
)
static member GetStream : 
        key : byte[] * 
        salt : byte[] * 
        cost : int * 
        blockSize : int * 
        parallel : int * 
        maxThreads : Nullable<int> -> Pbkdf2 

Parameters

key
Type: SystemByte
The key to derive from.
salt
Type: SystemByte
The salt. A unique salt means a unique scrypt stream, even if the original key is identical.
cost
Type: SystemInt32
The cost parameter, typically a fairly large number such as 262144. Memory usage and CPU time scale approximately linearly with this parameter.
blockSize
Type: SystemInt32
The mixing block size, typically 8. Memory usage and CPU time scale approximately linearly with this parameter.
parallel
Type: SystemInt32
The level of parallelism, typically 1. CPU time scales approximately linearly with this parameter.
maxThreads
Type: SystemNullableInt32
The maximum number of threads to spawn to derive the key. This is limited by the parallel value. null will use as many threads as possible.

Return Value

Type: Pbkdf2
The derived key stream.
See Also

Reference