Main Page Modules Data Structures File List Data Fields Globals Related Pages

# beecrypt/blockmode.h File Reference

Blockcipher operation modes, header. More...

`#include "beecrypt.h"`

Go to the source code of this file.

## Functions

int | blockEncrypt (const blockCipher *bc, blockCipherParam *bp, cipherMode mode, int blocks, uint32 *dst, const uint32 *src)
int | blockDecrypt (const blockCipher *bc, blockCipherParam *bp, cipherMode mode, int blocks, uint32 *dst, const uint32 *src)

## Detailed Description

Blockcipher operation modes, header.

Definition in file blockmode.h.

## Function Documentation

int blockDecrypt | ( | const blockCipher * | bc,
|  | blockCipherParam * | bp,
|  | cipherMode | mode,
|  | int | blocks,
|  | uint32 * | dst,
|  | const uint32 * | src
| ) |

Parameters:

  bc | blockcipher context
  bp | blockcipher parameters
  mode | ECB or CBC
  blocks | no. blocks to decrypt

Return values:

  dst | plaintext block

Parameters:

  src | ciphertext block

Returns:
  0 on success, -1 on failure

Definition at line 51 of file blockmode.c.

Referenced by blockEncrypt, and dhaes_pContextDecrypt.

int blockEncrypt | ( | const blockCipher * | bc,
|  | blockCipherParam * | bp,
|  | cipherMode | mode,
|  | int | blocks,
|  | uint32 * | dst,
|  | const uint32 * | src
| ) |

Parameters:

  bc | blockcipher context
  bp | blockcipher parameters
  mode | ECB or CBC
  blocks | no. blocks to encrypt

Return values:

  dst | ciphertext block

Parameters:

  src | plaintext block

Returns:
  0 on success, -1 on failure

Definition at line 33 of file blockmode.c.

References BEECRYPTAPI, blockCipherParam, blockDecrypt, cipherMode, and uint32.

Referenced by dhaes_pContextEncrypt.