Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 03-02-2009
Member
 
Join Date: Jan 2009
Posts: 61
Cryptography in PHP

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.
Reply With Quote
  #2  
Old 03-02-2009
Member
 
Join Date: Dec 2008
Posts: 47
Re: Cryptography in PHP

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.
Reply With Quote
  #3  
Old 03-02-2009
Member
 
Join Date: Dec 2008
Posts: 322
Re: Cryptography in PHP

go here you will get go informative help
http://www.ibm.com/developerworks/op...s-php-encrypt/
Reply With Quote
  #4  
Old 03-02-2009
Member
 
Join Date: Jan 2008
Posts: 1,515
Re: Cryptography in PHP

check this manual it will provide you good information its better you refer this
http://phpbuilder.com/manual/en/refs.crypto.php
Reply With Quote
  #5  
Old 03-02-2009
Member
 
Join Date: Dec 2008
Posts: 196
Re: Cryptography in 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.
Reply With Quote
  #6  
Old 05-02-2009
Member
 
Join Date: May 2008
Posts: 2,383
Re: Cryptography in PHP

Default PHP Encryption Functions
PHP encryption functions: md5(), crypt(), and sha1(). The md5() function prototype :

Quote:
string md5(string $str [, bool $raw_output ])
The function calculates the MD5 hash using the MD5 Message-Digest algorithm. The $str argument represents the string to be encrypted.

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:

Quote:
string crypt (string $str [, string $salt ])
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.

The PHP sha1() function calculates the SHA-1 hash of a string. The sha1() function prototype is:

Quote:
string sha1 (string $str [, bool $raw_output ])
The function returns the SHA-1 hash as a string. Again, the $str argument represents the input string

Quote:
<?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);
}
?>
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Cryptography in PHP"
Thread Thread Starter Forum Replies Last Post
No secure communication in Symmetric Key cryptography Shiva$m Networking & Security 3 03-01-2011 09:07 AM
Cryptography and Public Key Infrastructure Allison Software Development 14 30-11-2010 06:43 AM
How the Cryptography work in Outlook 2003 SANG18 Windows Software 5 24-12-2009 02:55 AM
What is the Digital signature in cryptography? beelow Networking & Security 3 01-12-2009 08:27 AM


All times are GMT +5.5. The time now is 08:18 AM.