mcrypt_module_open

(PHP 4 >= 4.0.2, PHP 5, PHP 7) Opens the module of the algorithm and the mode to be used resource mcrypt_module_open ( string $algorithm, string $algorithm_directory, string $mode, string $mode_directory ) This function opens the module of the algorithm and the mode to be used. The name of the algorithm is specified in algorithm, e.g. "twofish" or is one of the MCRYPT_ciphername constants. The module is closed by calling

mcrypt_module_self_test

(PHP 4 >= 4.0.2, PHP 5, PHP 7) This function runs a self test on the specified module bool mcrypt_module_self_test ( string $algorithm [, string $lib_dir ] ) This function runs the self test on the algorithm specified. Parameters: algorithm One of the MCRYPT_ciphername constants, or the name of the algorithm as string. lib_dir The opti

mcrypt_ofb

(PHP 4, PHP 5) Encrypts/decrypts data in OFB mode string mcrypt_ofb ( int $cipher, string $key, string $data, int $mode, string $iv ) string mcrypt_ofb ( 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 or higher. The mode should be either MCRYPT_ENCRYPT or MCRYPT_DECRYPT.

mdecrypt_generic

(PHP 4 >= 4.0.2, PHP 5, PHP 7) Decrypts data string mdecrypt_generic ( resource $td, string $data ) This function decrypts data. Note that the length of the returned string can in fact be longer than the unencrypted string, due to the padding of the data. Parameters: td An encryption descriptor returned by mcrypt_module_open() data E

mhash_count

(PHP 4, PHP 5, PHP 7) Gets the highest available hash ID int mhash_count ( void ) Gets the highest available hash ID. Returns: Returns the highest available hash ID. Hashes are numbered from 0 to this hash ID. Examples: Traversing all hashes <?php $nr = mhash_count(); for ($i = 0; $i <= $nr; $i++) {     echo sprin

mhash_get_block_size

(PHP 4, PHP 5, PHP 7) Gets the block size of the specified hash int mhash_get_block_size ( int $hash ) Gets the size of a block of the specified hash. Parameters: hash The hash ID. One of the MHASH_hashname constants. Returns: Returns the size in bytes or FALSE, if the hash does not exist. Example

mhash_get_hash_name

(PHP 4, PHP 5, PHP 7) Gets the name of the specified hash string mhash_get_hash_name ( int $hash ) Gets the name of the specified hash. Parameters: hash The hash ID. One of the MHASH_hashname constants. Returns: Returns the name of the hash or FALSE, if the hash does not exist. Examples:

mhash_keygen_s2k

(PHP 4 >= 4.0.4, PHP 5, PHP 7) Generates a key string mhash_keygen_s2k ( int $hash, string $password, string $salt, int $bytes ) Generates a key according to the given hash, using an user provided password. This is the Salted S2K algorithm as specified in the OpenPGP document (» RFC 2440). Keep in mind that user supplied passwords are not really suitable to be used as keys in cryptographic algorithms, since users norm

mhash

(PHP 4, PHP 5, PHP 7) Computes hash string mhash ( int $hash, string $data [, string $key ] ) mhash() applies a hash function specified by hash to the data. Parameters: hash The hash ID. One of the MHASH_hashname constants. data The user input, as a string. key If specified, the function will return t

openssl_cipher_iv_length

(PHP 5 >= PHP 5.3.3, PHP 7) Gets the cipher iv length int openssl_cipher_iv_length ( string $method ) Gets the cipher initialization vector (iv) length. Parameters: method The cipher method, see openssl_get_cipher_methods() for a list of potential values. Returns: Returns the cipher length on success, or FALSE on failure.