-
Notifications
You must be signed in to change notification settings - Fork 3
Block crypto
Bruce Wayne edited this page Jul 21, 2021
·
3 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); //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 Encrypt4(ReadOnlySpan<byte>, Span<byte>) |
Encrypt four block of the data |
void Reset() |
Reset the status |
void Dispose() |
Releases the resources |