/** * Create password from login * * Method to create password from login * * @access public * @param string Login * @param string Type * @param integer Key * @return string */ function createFromLogin($login, $type, $key = 0) { switch ($type) { case 'reverse': return strrev($login); case 'shuffle': return Text_Password::_shuffle($login); case 'xor': return Text_Password::_xor($login, $key); case 'rot13': return str_rot13($login); case 'rotx': return Text_Password::_rotx($login, $key); case 'rotx++': return Text_Password::_rotxpp($login, $key); case 'rotx--': return Text_Password::_rotxmm($login, $key); case 'ascii_rotx': return Text_Password::_asciiRotx($login, $key); case 'ascii_rotx++': return Text_Password::_asciiRotxpp($login, $key); case 'ascii_rotx--': return Text_Password::_asciiRotxmm($login, $key); } }
/** * Create password from login * * Method to create password from login * * @access public * @param string Login * @param string Type * @param integer Key * @return string */ public static function createFromLogin($login, $type, $key = 0) { switch ($type) { case Text_Password::TYPE_REVERSE: return strrev($login); case Text_Password::TYPE_SHUFFLE: return Text_Password::_shuffle($login); case Text_Password::TYPE_XOR: return Text_Password::_xor($login, $key); case Text_Password::TYPE_ROT13: return str_rot13($login); case Text_Password::TYPE_ROTX: return Text_Password::_rotx($login, $key); case Text_Password::TYPE_ROTXPP: return Text_Password::_rotxpp($login, $key); case Text_Password::TYPE_ROTXMM: return Text_Password::_rotxmm($login, $key); case Text_Password::TYPE_ASCII_ROTX: return Text_Password::_asciiRotx($login, $key); case Text_Password::TYPE_ASCII_ROTXPP: return Text_Password::_asciiRotxpp($login, $key); case Text_Password::TYPE_ASCII_ROTXMM: return Text_Password::_asciiRotxmm($login, $key); } }