Zen API

- Home
- Topics
- Types
- Files

All Classes Files Functions Variables Typedefs Friends Macros Modules Pages

kStatus kCipher_Encrypt | ( | kCipher | cipher,
|  | const void * | data,
|  | kSize | dataLength,
|  | kArray1 | result
| ) |  |

Encrypts data.

Block ciphers operate on fixed block sizes, so padding may be added. The type of padding depends on settings provided to the cipher object. It is the caller's responsible to remove any padding from decrypted data.

Parameters

  cipher | Cipher object.
  data | Data to encrypt.
  dataLength | Length of the data to encrypt, in bytes.
  result | Receives encrypted data.

Returns
  Operation status.