FireSync API
 All Classes Files Functions Variables Typedefs Friends Macros Modules Pages
kStatus kCipher_Encrypt ( kCipher  cipher,
const void *  data,
kSize  dataLength,
kArray1  result 
)

Encrypts data.

Note that block cipher modes operates on fixed block sizes. So padding may be added. The type of padding depends on the padding mode set in the constructor. The caller is responsible to remove the padding from decrypted data.

When decrypting data the same cipher mode has to be used when the data was encrypted.

Parameters
cipherCipher object.
dataData to encrypt.
dataLengthLength of the data in bytes.
resultEncrypted data.
Returns
Operation status.