Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Hossam Suliman  >  Secure MD5  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example of class usage
Class: Secure MD5
Generate and validate a MD5 hash with a salt value
Author: By
Last change:
Date: 2 years ago
Size: 452 bytes
 

Contents

Class file image Download
<?php

/**
 * Example of SecureMd5 class usage.
 *
 * @author Hossamzee (hossam_zee@yahoo.com).
 * @date 18 Mar 2012.
 */
 
require_once("./secure.md5.class.php"); 

/* Usage of SecureMd5 class. */
$test_string "Hello World";
$salted_md5 SecureMd5::getSaltedMd5($test_string);

echo 
$salted_md5;
echo 
"<br />";

/* Usage of validating the salted md5 hash */
var_dump(
    
SecureMd5::validateSaltedMd5($salted_md5$test_string)
);