Results 1 to 6 of 6

Thread: Cryptography in PHP

  1. #1
    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.

  2. #2
    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.

  3. #3
    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/

  4. #4
    Join Date
    Jan 2008
    Posts
    1,521

    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

  5. #5
    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.

  6. #6
    Join Date
    May 2008
    Posts
    2,389

    Re: Cryptography in PHP

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

    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:

    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:

    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

    <?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);
    }
    ?>

Similar Threads

  1. No secure communication in Symmetric Key cryptography
    By Shiva$m in forum Networking & Security
    Replies: 3
    Last Post: 03-01-2011, 09:07 AM
  2. Cryptography and Public Key Infrastructure
    By Allison in forum Software Development
    Replies: 14
    Last Post: 30-11-2010, 06:43 AM
  3. How the Cryptography work in Outlook 2003
    By SANG18 in forum Windows Software
    Replies: 5
    Last Post: 24-12-2009, 02:55 AM
  4. What is the Digital signature in cryptography?
    By beelow in forum Networking & Security
    Replies: 3
    Last Post: 01-12-2009, 08:27 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,848,918.87344 seconds with 17 queries