<PackageReference Include="BouncyCastle.Cryptography" Version="2.7.0" />

Org.BouncyCastle.Crypto.Parameters.ParametersWithSalt

Wrapper class for parameters which include a salt value.
public ICipherParameters Parameters { get; }

Return the base parameters associated with this salt.

public int SaltLength { get; }

Return the length of the salt in bytes.

public ParametersWithSalt(ICipherParameters parameters, byte[] salt)

Basic constructor.

public ParametersWithSalt(ICipherParameters parameters, byte[] salt, int saltOff, int saltLen)

Constructor with offset and length for salt.

public ParametersWithSalt(ICipherParameters parameters, ReadOnlySpan<byte> salt)

Constructor using Span for salt.

public static ParametersWithSalt Create<TState>(ICipherParameters parameters, int saltLength, TState state, SpanAction<byte, TState> action)

Create a new ParametersWithSalt instance using a span action.

public void CopySaltTo(byte[] buf, int off, int len)

Copy the salt into a segment of a destination buffer.

public byte[] GetSalt()

Return a copy of the salt.