IBlockCrypto ecb = AESUtils.CreateECB(ReadOnlySpan<byte> key);
IBlockCrypto cbc = AESUtils.CreateCBC(ReadOnlySpan<byte> key, ReadOnlySpan<byte> iv);
IBlockCrypto ecb = new SM4Crypto(ReadOnlySpan<byte> key); //ECB
IBlockCrypto cbc = new CBCBlockMode(ecb, ReadOnlySpan<byte> iv); //CBC
Property |
Description |
Name |
Name of the crypto |
BlockSize |
Block size of the crypto |
Method |
Description |
void Encrypt(ReadOnlySpan<byte>, Span<byte>) |
Encrypt a block of the data |
void Decrypt(ReadOnlySpan<byte>, Span<byte>) |
Decrypt a block of the data |
void Reset() |
Reset the state |
void Dispose() |
Releases the resources |