function yk_e($a, $c) { for ($f = 0, $i, $e = '', $h = 0; 256 > $h; $h++) { $b[$h] = $h; } for ($h = 0; 256 > $h; $h++) { $f = ($f + $b[$h] + charCodeAt($a, $h % strlen($a))) % 256; $i = $b[$h]; $b[$h] = $b[$f]; $b[$f] = $i; } for ($q = $f = $h = 0; $q < strlen($c); $q++) { $h = ($h + 1) % 256; $f = ($f + $b[$h]) % 256; $i = $b[$h]; $b[$h] = $b[$f]; $b[$f] = $i; $e .= fromCharCode(charCodeAt($c, $q) ^ $b[($b[$h] + $b[$f]) % 256]); } return $e; }
/** * Funcion que valida solo el ingreso de valores numericos por teclado. * @param (event) e - texto o valor numerico a verificar. * @return (Boolean) - True si es numerico, en caso contrario False. */ function validar_numeric($e) { $tecla = document . all ? $e . keyCode : $e . which; if ($tecla == 8) { return true; } $patron = "/[1234567890]/"; $te = String . fromCharCode($tecla); return patron . test($te); }