Encryption And Decryption
Encryption And Decryption:
1.
md5(string) : function used to
encrypting the string to 32 bit hexa decimal format.
<?php
Echo
strtoupper(md5(“india”));
?>
OutPut
B4E12645C1CA6D4A5AD8EB1FE8ACE880
2.
sha1(string) : calculate the sha1 hash
of a string.
3.
Crc32(string) : calculate the crc32
polynomial of a string.
<?php
Echo
crc32("Inidia");
?>
OutPut:
955083134
4.
Crypt(string) : encodes the data as 34
character length with alpha numeric and special characters.
<?php
Echo
crypt("India");
?>
OutPut :
$1$rW4.YU..$sRmZRxWrZ1g7QOa/VTl27/
5. Base64_encode(string) :
6. Base64_dencode(encrypted data)
<?php
$ecnode_data
= base64_encode("India");
echo
"encode data ".$ecnode_data."<br>";
$org_data
= base64_decode($ecnode_data);
echo
"decoded data ".$org_data;
?>
OutPut:
encode
data SW5kaWE=
decoded
data India
encryption and decryption,encryption and decryption algorithms,encryption and decryption algorithm,algorithm for encryption and decryption,encryption and decryption of data.
0 comments:
Post a Comment