我在输入中获得了验证码加密值,例如:
value=" JFIF >CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), default quality
C $.' ",#(7),01444'9=82<.342 C2!!22222222222222222222222222222222222222222222222222 ( x"
} !1AQa "q2 #B R $3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz
w !1AQ aq"2 B #3R br
$4 % &'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ? Ԓ 61N 7I v n % O;pHU C8Xn " + 8 s c NNGw e ֱx4裴 Ԡ;+ uv i Q ea @@ [ o H. D!K7 6 ) CR nq t3m O R g$ L Ź `:ǘ s6 n| U PC h M 7y F W X R RX8u c \c )] kw$ p _ w > 5 ˩P ̪ 4h? .7n Th +mbn\ , ][Ķ| I$pe "
我如何获得像“CDEF01jhdfz”这样的普通加密字符串而不是上面的字符串?我认为这是一个加密问题..这是我的代码:
function str_encrypt( $str ) {
$mystr = index_array( $str, KEY_VALUES );
$mystr = mybase64_encode( rawurlencode( $mystr ) );
return $mystr;
}
function str_decrypt( $str ) {
$mystr = rawurldecode( mybase64_decode( $str ) ) ;
$mystr = index_array( $mystr, KEY_VALUES );
return $mystr;
}
$captcha = new CaptchaCode();
$code = str_encrypt( $captcha->generateCode(6) );
$captcha1 = new CaptchaImages();
$captcha1->GenerateImage( $width, $height, str_decrypt( $code ) );
echo $code;
i m getting $code value through below function on my index.php:
jQuery.get('<?php echo captcha_images.php ?>', function( encoded_code ) {
jQuery('#security_check').val( encoded_code );
}