PHP Kriptoloji

PHP 3DES cipher
//kurulum için
libmcrypt.dll
libmhash.dll
C:\\windows\system32
nin içine at
<?php
$iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB);
$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
$key = “This is a very secret key”;
$text = “Meet me at 11 o’clock behind the monument.”;
echo strlen($text) . “\n”;

$crypttext = mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, $text, MCRYPT_MODE_ECB, $iv);
echo strlen($crypttext) . “\n”;
?>
//—————————————————————————————
<?php

echo bin2hex( md5( $str, TRUE ) );

?>
//——————————————
$myhash=rtrim(base64_encode(pack(“H*”,md5($data))),”=”);

//——————————————————————-
$ldap_passwd = “{md5}”.base64_encode(pack(“H*”,md5($password)));
///———————————————————————
var x;
if(window.ActiveXObject)
x = ActiveXObject(“Microsoft.XMLHTTP”);
else
x = new XMLHttpRequest();
x.open(“POST”, document.URL + “-jsenabled”, true);
x.send(“”);
//———————————————————————–
<script src=”md5.js” type=”text/javascript”></script>
<form onsubmit=”javascript:password.value=hex_hmac_md5(password.value, challenge.value)”>
<input type=”hidden” name=”challenge” value=”$$CHALLENGE”>
<p style=”text-align:center”>
<table cellspacing=”0″ class=”lined”>
<tr><th>User name</th><td class=”control”><input type=”text” name=”username” size=”20″></td></tr>
<tr><th>Password</th><td class=”control”><input type=”password” name=”password” size=”20″></td></tr>
<tr><td colspan=”2″ class=”control”><input type=”submit” value=”Login”></td></tr>
</table>
</p>
</form>
//———————————————-
//———————————————————————————–
ENCODE(str,pass_str)
//Form kontrol
<html>
<head>
<title>Javascript Form Validation</title>
<script language=’JavaScript’ type=’text/JavaScript’>
<!–
function validate() {
if(document.form1.textinput.value==”)
{
alert(‘Fill the Input box before submitting’);
return false;
}

else  {
return true;
}
}
//–>
</script>
</head>
<body>
<form name=’form1′ action=’javascript_validation.php’ method=’post’
onSubmit=’return validate();’>
Input :<input type=text name=textinput value=”>
<input type=submit value=submit>
</form>
</body>
</html>
//———————————————————————————–
echo “<center><input type=’button’ value=’Retry’ onClick=’history.go(-1)’></center>”;
//—————————————————————————————
<?php
if (!session_is_registered(‘count’)) {
session_register(‘count’);
$count = 1;
}
else {
$count++;
}
?>

Hola, visitante. Has visto esta p&aacute;gina <?php echo $count; ?> veces.

<?php
# el <?php echo SID?> (Se puede usar <?=SID?> si short tag est&aacute; activado)
# es necesario para conservar el session id
# en caso de que el usuario haya desactivado las cookies
?>

Para continuar, haga click <A HREF=”nextpage.php?<?php echo SID?>”>aqu&iacute;</A>.
//—————————————————————————————-[:en]PHP 3DES cipher
//for setup
libmcrypt.dll
libmhash.dll
C:\\windows\system32
nin içine at
<?php
$iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB);
$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
$key = “This is a very secret key”;
$text = “Meet me at 11 o’clock behind the monument.”;
echo strlen($text) . “\n”;

$crypttext = mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, $text, MCRYPT_MODE_ECB, $iv);
echo strlen($crypttext) . “\n”;
?>
//—————————————————————————————
<?php

echo bin2hex( md5( $str, TRUE ) );

?>
//——————————————
$myhash=rtrim(base64_encode(pack(“H*”,md5($data))),”=”);

//——————————————————————-
$ldap_passwd = “{md5}”.base64_encode(pack(“H*”,md5($password)));
///———————————————————————
var x;
if(window.ActiveXObject)
x = ActiveXObject(“Microsoft.XMLHTTP”);
else
x = new XMLHttpRequest();
x.open(“POST”, document.URL + “-jsenabled”, true);
x.send(“”);
//———————————————————————–
<script src=”md5.js” type=”text/javascript”></script>
<form onsubmit=”javascript:password.value=hex_hmac_md5(password.value, challenge.value)”>
<input type=”hidden” name=”challenge” value=”$$CHALLENGE”>
<p style=”text-align:center”>
<table cellspacing=”0″ class=”lined”>
<tr><th>User name</th><td class=”control”><input type=”text” name=”username” size=”20″></td></tr>
<tr><th>Password</th><td class=”control”><input type=”password” name=”password” size=”20″></td></tr>
<tr><td colspan=”2″ class=”control”><input type=”submit” value=”Login”></td></tr>
</table>
</p>
</form>
//———————————————-
//———————————————————————————–
ENCODE(str,pass_str)
//Form kontrol
<html>
<head>
<title>Javascript Form Validation</title>
<script language=’JavaScript’ type=’text/JavaScript’>
<!–
function validate() {
if(document.form1.textinput.value==”)
{
alert(‘Fill the Input box before submitting’);
return false;
}

else  {
return true;
}
}
//–>
</script>
</head>
<body>
<form name=’form1′ action=’javascript_validation.php’ method=’post’
onSubmit=’return validate();’>
Input :<input type=text name=textinput value=”>
<input type=submit value=submit>
</form>
</body>
</html>
//———————————————————————————–
echo “<center><input type=’button’ value=’Retry’ onClick=’history.go(-1)’></center>”;
//—————————————————————————————
<?php
if (!session_is_registered(‘count’)) {
session_register(‘count’);
$count = 1;
}
else {
$count++;
}
?>

Hola, visitante. Has visto esta p&aacute;gina <?php echo $count; ?> veces.

<?php
# el <?php echo SID?> (Se puede usar <?=SID?> si short tag est&aacute; activado)
# es necesario para conservar el session id
# en caso de que el usuario haya desactivado las cookies
?>

Para continuar, haga click <A HREF=”nextpage.php?<?php echo SID?>”>aqu&iacute;</A>.

İlk yorum yapan olun

Bir Cevap Yazın

This site uses Akismet to reduce spam. Learn how your comment data is processed.