Table of Contents

Interface IAlgorithmProvider

Namespace
The.Security.Cryptography
Assembly
Instagile.dll

Factory for platform-specific cryptographic algorithms.

public interface IAlgorithmProvider

Methods

CreateAead(bool)

Initialise an AES-GCM algorithm with a generated key, supporting EncryptStream(Stream, byte[]) if streaming (at extra cost in WebAssembly).

IAeadAlgorithm CreateAead(bool streaming = false)

Parameters

streaming bool

Returns

IAeadAlgorithm

CreateAeadAsync(byte[], bool)

Initialise an AES-GCM algorithm with a supplied key, supporting EncryptStream(Stream, byte[]) if streaming (at extra cost in WebAssembly).

Task<IAeadAlgorithm> CreateAeadAsync(byte[] key, bool streaming = false)

Parameters

key byte[]
streaming bool

Returns

Task<IAeadAlgorithm>

DerivePasswordKeyAsync(string, byte[], PasswordKeyDerivation)

Derive a 256-bit key from a password and salt.

Task<byte[]> DerivePasswordKeyAsync(string password, byte[] salt, PasswordKeyDerivation derivation)

Parameters

password string
salt byte[]
derivation PasswordKeyDerivation

Returns

Task<byte[]>