PHP Classes

Hash: Store and validate hashes for data authentication

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in
  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 (11 years ago) RSS 2.0 feedNot enough user ratingsTotal: 2,036 All time: 1,819 This week: 1,279Up
Version License Categories  
class_hash 1.0.0GNU General Publi...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: 38
All time rank: 261 in France France
Week rank: 226 Down13 in France France Down

  Files folder image Files  
File Role Description
Accessible without login Plain text file Aux. Function library to manage mysql database
Plain text file 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,036All time:1,819
 This week:0This week:1,279Up