Login   Register  
PHP Classes
elePHPant
Icontem

Hash: Store and validate hashes for data authentication

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2004-01-08 (10 years ago) RSS 2.0 feedNot enough user ratingsTotal: 2,030 All time: 1,814 This week: 1,420Up
Version License Categories  
class_hash 1.0GNU General Public Lice...Cryptography, Validation, Security
Description Author  

This class is meant to create hash strings that are used as keys to store private data.

The hash strings and the private data are stored in a database table so it can verified securely only on the server side. This capability can be for instance to prevent link stealing.

You may construct an hash string from:

- Session id of the user
- Private data of the server
- Private data of the web site
- An item to check
- Timestamp of a query
- A maximum number of accesses
- A maximum duration

Next, in another page, the class can check whether the hash is valid by passing as parameter in the UL, depending on:

- The item to check
- The session id of the user
- The private data of the server
- The private data of the Web site
- The moment when the has was saved in database
- The moment and the number of the access

Picture of Julien PACHET
Name: Julien PACHET <contact>
Classes: 15 packages by
Country: France France
Age: 37
All time rank: Not yet ranked
Week rank: 1459 in France France

  Files folder image Files  
File Role Description
Accessible without login Plain text file biblio_mysql.inc.php Aux. Function library to manage mysql database
Plain text file class_hash.inc.php Class base class source
Accessible without login Plain text file hash_check.php Example Second page to check the hash and let access to the ressource
Accessible without login Plain text file hash_start.php Example Start page with the link to the check page with the resource

 Version Control Unique User Downloads Download Rankings  
 0%Total:2,030All time:1,814
 This week:0This week:1,420Up