/** * Returns the name of the opened algorithm * * This function returns the name of the algorithm. * * @param \phpseclib\Crypt\Base $td * @return string|bool * @access public */ function phpseclib_mcrypt_enc_get_algorithms_name(Base $td) { $reflection = new \ReflectionObject($td); switch ($reflection->getShortName()) { case 'Rijndael': return 'RIJNDAEL-' . $td->getBlockLength(); case 'Twofish': return 'TWOFISH'; case 'Blowfish': return 'BLOWFISH'; // what about BLOWFISH-COMPAT? // what about BLOWFISH-COMPAT? case 'DES': return 'DES'; case 'RC2': return 'RC2'; case 'TripleDES': return 'TRIPLEDES'; case 'RC4': return 'ARCFOUR'; } return false; }