Generic block cipher interface.
More...
Generic block cipher interface.
◆ SHI_BlockCipher
A SHI_BlockCipher object decrypts blocks of data.
◆ SHI_BlockCipher_DecryptBlock()
Decrypt a block of data.
- Parameters
-
self | The SHI_BlockCipher on which the method is invoked. |
in_block | Pointer to the block data to decrypt. The size of the block must be equal to the block size of the cipher algorithm implemented by this object. |
out_block | Pointer to the memory buffer where the decrypted block data will be written. That buffer must be large enough to hold a full block. |
◆ SHI_BlockCipher_Destroy()
Destroys a block cipher object.
The object can no longer be used after this method returns.
- Parameters
-
self | The SHI_BlockCipher to destroy. |
◆ SHI_BlockCipher_EncryptBlock()
Encrypt a block of data.
Use this method to implement counter mode.
- Parameters
-
self | The SHI_BlockCipher on which the method is invoked. |
in_block | Pointer to the block data to encrypt. The size of the block must be equal to the block size of the cipher algorithm implemented by this object. |
out_block | Pointer to the memory buffer where the encrypted block data will be written. That buffer must be large enough to hold a full block. |
◆ SHI_BlockCipher_GetBlockSize()
Returns the block size for the block cipher.
- Parameters
-
self | The SHI_BlockCipher on which the method is invoked. |
- Returns
- The size, in bytes, of the blocks that this cipher can process.