PHP Wysardry
PHP Manual

PHP documentation.



Home / PHP / Manual / ...



PHP Manual
Prev Next

mcrypt_cbc

(3.0.8 - 3.0.18 only, PHP 4 >= 4.0.0)

mcrypt_cbc -- Encrypt/decrypt data in CBC mode

Description

string mcrypt_cbc (int cipher, string key, string data, int mode [, string iv])

string mcrypt_cbc (string cipher, string key, string data, int mode [, string iv])

The first prototype is when linked against libmcrypt 2.2.x, the second when linked against libmcrypt 2.4.x.

mcrypt_cbc() encrypts or decrypts (depending on mode) the data with cipher and key in CBC cipher mode and returns the resulting string.

Cipher is one of the MCRYPT_ciphername constants.

Key is the key supplied to the algorithm. It must be kept secret.

Data is the data which shall be encrypted/decrypted.

Mode is MCRYPT_ENCRYPT or MCRYPT_DECRYPT.

IV is the optional initialization vector.

See also: mcrypt_cfb(), mcrypt_ecb(), and mcrypt_ofb().


Prev Manual Home Next
mcrypt_create_iv Up mcrypt_cfb
Site Menu

Amazon.ca
Amazon.com
Amazon.co.uk



Most recently updated on 11 May, 2003

Home / PHP / Manual / ...



Please feel free to contact us with any comments or suggestions
PHP Manual
PHP Wysardry

This site is hosted by Spaceports