hi i am looking for help regarding Cryptography in PHP.i am working on php form recent few weeks and i am enthusiastically looking to fast learn about it so please help me to work on this. thank you.
hi i am looking for help regarding Cryptography in PHP.i am working on php form recent few weeks and i am enthusiastically looking to fast learn about it so please help me to work on this. thank you.
Secure hash based encryption:Blockcipher encryption with PHP hash functions
BmpCrypt:Encrypt and decrypt data hidden in bitmap image
RSA :RSA is a very important encryption algorithm. It allows securely transmitting data encrypted with a private key that can only be decrypted with a public key.There is class provides a pure PHP implementation of the RSA encryption algorithm, thus without relying on any PHP cryptography extensions.
go here you will get go informative help
http://www.ibm.com/developerworks/op...s-php-encrypt/
check this manual it will provide you good information its better you refer this
http://phpbuilder.com/manual/en/refs.crypto.php
hi
you can use software like Dev-PHP .this application better flexibility.ev-PHP 2.3 is an all in one absolutely free PHP development kit that will save your money as you will not have to buy those other very expensive commercial IDEs. Dev-PHP is a complete package containing all the tools that you need to develop a complete php script or just modifying an existing project. In addition to the plan text editor that supports multiple files editing, It shows the code colored according to the language syntax helping you to quickly detect programming errors while writing your program.
Default PHP Encryption Functions
PHP encryption functions: md5(), crypt(), and sha1(). The md5() function prototype :
The function calculates the MD5 hash using the MD5 Message-Digest algorithm. The $str argument represents the string to be encrypted.string md5(string $str [, bool $raw_output ])
The PHP crypt() function is a one-way encryption function that lets you confirm that an entered password matches a stored encrypted one—without having to decrypt anything. The crypt() function prototype is:
It returns an encrypted string using the standard Unix DES-based encryption algorithm . The $str argument is the string to be encrypted and the optional $salt argument is a string on which to base the encryption. If you don't provide the salt string, PHP will randomly generate one each time you call this function.string crypt (string $str [, string $salt ])
The PHP sha1() function calculates the SHA-1 hash of a string. The sha1() function prototype is:
The function returns the SHA-1 hash as a string. Again, the $str argument represents the input stringstring sha1 (string $str [, bool $raw_output ])
<?php
$file = 'textfile.txt';
$initial_contents = file_get_contents($file);
if($initial_contents){
$password = 'OctaviaAnghel';
//Calculates the md5 hash
$md5_data = md5($password);
//This function encrypts data
$crypt = crypt($password);
//Calculate the sha1 hash
$sha1 = sha1($password);
$encrypted_file = @fopen('encrypted.txt','w');
$ok_encrypt = @fwrite($encrypted_file,'md5: '. $md5_data."\r\n".'crypt:
'.$crypt."\r\n".'sha1: '.$sha1);
if($ok_encrypt){
echo 'The encrypted code was succesfully created'.
' in encrypted_file.txt!!!'.'
';
}
else{
echo ("The write of this file failed!");
}
@fclose($encrypted_file);
}
?>
Bookmarks