Wasabi ExpressPlay SDK for Embedded Systems  1.23.0
Typedefs | Functions
SHI_BlockCipher Class

Generic block cipher interface. More...

Typedefs

typedef struct SHI_BlockCipher SHI_BlockCipher
 A SHI_BlockCipher object decrypts blocks of data. More...
 

Functions

SHI_PUBLIC_API SHI_Result SHI_BlockCipher_Destroy (SHI_BlockCipher *self)
 Destroys a block cipher object. More...
 
SHI_PUBLIC_API SHI_Size SHI_BlockCipher_GetBlockSize (SHI_BlockCipher *self)
 Returns the block size for the block cipher. More...
 
SHI_PUBLIC_API SHI_Result SHI_BlockCipher_DecryptBlock (SHI_BlockCipher *self, const unsigned char *in_block, unsigned char *out_block)
 Decrypt a block of data. More...
 
SHI_PUBLIC_API SHI_Result SHI_BlockCipher_EncryptBlock (SHI_BlockCipher *self, const unsigned char *in_block, unsigned char *out_block)
 Encrypt a block of data. More...
 

Detailed Description

Generic block cipher interface.

Typedef Documentation

◆ SHI_BlockCipher

A SHI_BlockCipher object decrypts blocks of data.

Function Documentation

◆ SHI_BlockCipher_DecryptBlock()

SHI_PUBLIC_API SHI_Result SHI_BlockCipher_DecryptBlock ( SHI_BlockCipher self,
const unsigned char *  in_block,
unsigned char *  out_block 
)

Decrypt a block of data.

Parameters
selfThe SHI_BlockCipher on which the method is invoked.
in_blockPointer 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_blockPointer 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()

SHI_PUBLIC_API SHI_Result SHI_BlockCipher_Destroy ( SHI_BlockCipher self)

Destroys a block cipher object.

The object can no longer be used after this method returns.

Parameters
selfThe SHI_BlockCipher to destroy.

◆ SHI_BlockCipher_EncryptBlock()

SHI_PUBLIC_API SHI_Result SHI_BlockCipher_EncryptBlock ( SHI_BlockCipher self,
const unsigned char *  in_block,
unsigned char *  out_block 
)

Encrypt a block of data.

Use this method to implement counter mode.

Parameters
selfThe SHI_BlockCipher on which the method is invoked.
in_blockPointer 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_blockPointer 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()

SHI_PUBLIC_API SHI_Size SHI_BlockCipher_GetBlockSize ( SHI_BlockCipher self)

Returns the block size for the block cipher.

Parameters
selfThe SHI_BlockCipher on which the method is invoked.
Returns
The size, in bytes, of the blocks that this cipher can process.