mcrypt_enc_is_block_mode

(PHP 4 >= 4.0.2, PHP 5, PHP 7) Checks whether the opened mode outputs blocks bool mcrypt_enc_is_block_mode ( resource $td ) Tells whether the opened mode outputs blocks (e.g. TRUE for cbc and ecb, and FALSE for cfb and stream). Parameters: td The encryption descriptor. Returns: Returns TRUE if the mode outputs blocks of bytes, or FALSE if it o

mcrypt_enc_self_test

(PHP 4 >= 4.0.2, PHP 5, PHP 7) Runs a self test on the opened module int mcrypt_enc_self_test ( resource $td ) This function runs the self test on the algorithm specified by the descriptor td. Parameters: td The encryption descriptor. Returns: If the self test succeeds it returns FALSE. In case of an error, it returns TRUE.

mcrypt_encrypt

(PHP 4 >= 4.0.2, PHP 5, PHP 7) Encrypts plaintext with given parameters string mcrypt_encrypt ( string $cipher, string $key, string $data, string $mode [, string $iv ] ) Encrypts the data and returns it. Parameters: cipher One of the MCRYPT_ciphername constants, or the name of the algorithm as string. key The key with which the data wi

mcrypt_generic_deinit

(PHP 4 >= 4.0.7, PHP 5, PHP 7) This function deinitializes an encryption module bool mcrypt_generic_deinit ( resource $td ) This function terminates encryption specified by the encryption descriptor (td). It clears all buffers, but does not close the module. You need to call mcrypt_module_close() yourself. (But PHP does this for you at the end of the script.) Parameters: td

mcrypt_generic_end

(PHP 4 >= 4.0.2, PHP 5) This function terminates encryption bool mcrypt_generic_end ( resource $td ) This function terminates encryption specified by the encryption descriptor (td). Actually it clears all buffers, and closes all the modules used. Returns FALSE on error, or TRUE on success. mcrypt_generic_deinit() should be used instead of this function, as it can cause crash

mcrypt_generic_init

(PHP 4 >= 4.0.2, PHP 5, PHP 7) This function initializes all buffers needed for encryption int mcrypt_generic_init ( resource $td, string $key, string $iv ) You need to call this function before every call to mcrypt_generic() or mdecrypt_generic(). Parameters: td The encryption descriptor. key The maximum length of the key should be

mcrypt_generic

(PHP 4 >= 4.0.2, PHP 5, PHP 7) This function encrypts data string mcrypt_generic ( resource $td, string $data ) This function encrypts data. The data is padded with "\0" to make sure the length of the data is n * blocksize. This function returns the encrypted data. Note that the length of the returned string can in fact be longer than the input, due to the padding of the data. If you want to store the encrypted data in

mcrypt_get_block_size

(PHP 4, PHP 5, PHP 7) Gets the block size of the specified cipher int mcrypt_get_block_size ( int $cipher ) int mcrypt_get_block_size ( string $cipher , string $mode ) The first prototype is when linked against libmcrypt 2.2.x, the second when linked against libmcrypt 2.4.x or 2.5.x. mcrypt_get_block_size() is used to get the size of a block of the specified cipher (in combination with an encryption mode). It is more us

mcrypt_get_cipher_name

(PHP 4, PHP 5, PHP 7) Gets the name of the specified cipher string mcrypt_get_cipher_name ( int $cipher ) string mcrypt_get_cipher_name ( string $cipher ) mcrypt_get_cipher_name() is used to get the name of the specified cipher. mcrypt_get_cipher_name() takes the cipher number as an argument (libmcrypt 2.2.x) or takes the cipher name as an argument (libmcrypt 2.4.x or higher) and returns the name of the cipher or FALSE, i

mcrypt_get_iv_size

(PHP 4 >= 4.0.2, PHP 5, PHP 7) Returns the size of the IV belonging to a specific cipher/mode combination int mcrypt_get_iv_size ( string $cipher, string $mode ) Gets the size of the IV belonging to a specific cipher/mode combination. It is more useful to use the mcrypt_enc_get_iv_size() function as this uses the resource returned by mcrypt_module_open(). Parameters: cipher