public void Initialize(ReadOnlySpan<byte> key, ReadOnlySpan<byte> iv) { Debug.Assert(iv.Length == Aes.BlockSize); _aesCore = new AesCore(); _aesCore.Initialize(key, ReadOnlySpan<byte>.Empty, CipherMode.ECB, false); Iv = Unsafe.ReadUnaligned<Buffer16>(ref MemoryMarshal.GetReference(iv)); }
public void Initialize(ReadOnlySpan <byte> key, bool isDecrypting) { _aesCore = new AesCore(); _aesCore.Initialize(key, ReadOnlySpan <byte> .Empty, CipherMode.ECB, isDecrypting); }
public void Initialize(ReadOnlySpan <byte> key, ReadOnlySpan <byte> iv, bool isDecrypting) { _aesCore = new AesCore(); _aesCore.Initialize(key, iv, CipherMode.CBC, isDecrypting); }