I am hot, and when I'm not, I'm cold as ice.”


MD5 Generator

I commonly use php's md5() function to encrypt passwords on site logins. During the testing phase I've found it handy to not encrypt the password while developing administration web applications so I can easily see a password in the database and login as different user levels. Once the testing is done I needed a way to encrypt the passwords I had been using. This little MD5 Generator was the tool I built for it.

I also have a free SHA1 generator.


PHP MD5 Function”

The md5 function is available in PHP 4 & PHP 5.

You use the md5 function to calculate the md5 hash of a string.

Description: Calculates the MD5 hash of str using the RSA Data Security, Inc. MD5 Message-Digest Algorithm, and returns that hash.

string md5( string $str [, bool $raw_output= false ] )

Parameters:

  • str: The string.
  • raw_output: If the optional raw_output is set to TRUE, then the md5 digest is instead returned in raw binary format with a length of 16. Defaults to FALSE.

Return Values:Returns the hash as a 32-character hexadecimal number.

Example:

<?php
$str = 'apple';

if (md5($str) === '1f3870be274f6c ->
49b3e31a0c6728957f') {
echo "Would you like a green ->
or red apple?";
exit;
}
?>

What is MD5 Encryption?”

MD5 (Message-Digest algorithm 5) is a widely used cryptographic hash function with a 128-bit hash value. As an Internet standard (RFC 1321), MD5 has been employed in a wide variety of security applications, and is also commonly used to check the integrity of files. However, it has been shown that MD5 is not collision resistant[1]; as such, MD5 is not suitable for applications like SSL certificates or digital signatures that rely on this property. An MD5 hash is typically expressed as a 32 digit hexadecimal number.

MD5 was designed by Ron Rivest in 1991 to replace an earlier hash function, MD4. In 1996, a flaw was found with the design of MD5. While it was not a clearly fatal weakness, cryptographers began recommending the use of other algorithms, such as SHA-1 (which has since been found vulnerable). In 2004, more serious flaws were discovered, making further use of the algorithm for security purposes questionable. In 2007 a group of researchers including Arjen Lenstra described how to create a pair of files that share the same MD5 checksum. In an attack on MD5 published in December 2008, a group of researchers used this technique to fake SSL certificate validity US-CERT of the the U. S. Department of Homeland Security said MD5 "should be considered cryptographically broken and unsuitable for further use," and most U.S. government applications will be required to move to the SHA-2 family of hash functions by 2010.




darrenfauth.com is built on the Codeigniter MVC framework and using the Blueprint CSS framework for layout.