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
streamingbool
Returns
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
Returns
DerivePasswordKeyAsync(string, byte[], PasswordKeyDerivation)
Derive a 256-bit key from a password and salt.
Task<byte[]> DerivePasswordKeyAsync(string password, byte[] salt, PasswordKeyDerivation derivation)
Parameters
passwordstringsaltbyte[]derivationPasswordKeyDerivation