-
Notifications
You must be signed in to change notification settings - Fork 3
Block crypto
Bruce Wayne edited this page Oct 24, 2025
·
9 revisions
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); //CBCIBlockCrypto aes-xts = BlockCryptoModeCreate.AesXts(ReadOnlySpan<byte> key1, ReadOnlySpan<byte> key2, ReadOnlySpan<byte> iv)| Property | Description |
|---|---|
| Name | Name of the crypto |
| BlockSize | Block size of the crypto |
| Method | Description |
|---|---|
void Encrypt(ReadOnlySpan<byte>, Span<byte>) |
Encrypt data |
void Decrypt(ReadOnlySpan<byte>, Span<byte>) |
Decrypt data |
void Reset() |
Reset the state |
void Dispose() |
Releases the resources |