PHP Classes

PHP AIO Hasher: Create hashes of values using different algorithms

Recommend this page to a friend!
  Info   View files Example   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 104 All time: 9,679 This week: 108Up
Version Licenses PHP version Categories
aiohasher 1.0Artistic License, G...5.0Algorithms, PHP 5, Cryptography
Description 

Author

This class can create hashes of values using different algorithms.

It can take a given string and create hash values using different functions that implement multiple algorithms.

Currently it supports:

- MD5
- SHA1/SHA256/SHA512
- Whirlpool
- CRC32/CRC32B
- HAVAL256,3/HAVAL256,4/HAVAL256,5

Picture of Nick Daniels
  Performance   Level  
Name: Nick Daniels <contact>
Classes: 13 packages by
Country: United States United States
Age: 33
All time rank: 1108160 in United States United States
Week rank: 283 Up24 in United States United States Up
Innovation award
Innovation award
Nominee: 4x

Winner: 1x

Example

<?php

/**
 * All-In-One Hasher w/a Pinch of Salt.
 *
 * Algo's
 * - MD5
 * - SHA1/SHA256/SHA512
 * - WHIRLPOOL
 * - CRC32/CRC32B
 * - HAVAL256,3/HAVAL256,4/HAVAL256,5
 */

require_once 'AIOHasher.class.php';

echo
"MD5 no Salt: " . AIOHasher::md5('Hello') . PHP_EOL;
echo
"MD5 with Salt: " . AIOHasher::md5('Hello', true, '5417', 1) . PHP_EOL . PHP_EOL;

echo
"SHA1 no Salt: " . AIOHasher::sha1('Hello') . PHP_EOL;
echo
"SHA1 with Salt: " . AIOHasher::sha1('Hello', true, '5417', 1) . PHP_EOL . PHP_EOL;

echo
"SHA256 no Salt: " . AIOHasher::sha256('Hello') . PHP_EOL;
echo
"SHA256 with Salt: " . AIOHasher::sha256('Hello', true, '5417', 1) . PHP_EOL . PHP_EOL;

echo
"SHA512 no Salt: " . AIOHasher::sha512('Hello') . PHP_EOL;
echo
"SHA512 with Salt: " . AIOHasher::sha512('Hello', true, '5417', 1) . PHP_EOL . PHP_EOL;

echo
"WHIRLPOOL no Salt: " . AIOHasher::whirlpool('Hello') . PHP_EOL;
echo
"WHIRLPOOL with Salt: " . AIOHasher::whirlpool('Hello', true, '5417', 1) . PHP_EOL . PHP_EOL;

echo
"CRC32 no Salt: " . AIOHasher::crc32('Hello') . PHP_EOL;
echo
"CRC32 with Salt: " . AIOHasher::crc32('Hello', true, '5417', 1) . PHP_EOL . PHP_EOL;

echo
"CRC32B no Salt: " . AIOHasher::crc32b('Hello') . PHP_EOL;
echo
"CRC32B with Salt: " . AIOHasher::crc32b('Hello', true, '5417', 1) . PHP_EOL . PHP_EOL;

echo
"HAVAL256,3 no Salt: " . AIOHasher::haval256_3('Hello') . PHP_EOL;
echo
"HAVAL256,3 with Salt: " . AIOHasher::haval256_3('Hello', true, '5417', 1) . PHP_EOL;

echo
"HAVAL256,3 no Salt: " . AIOHasher::haval256_4('Hello') . PHP_EOL;
echo
"HAVAL256,3 with Salt: " . AIOHasher::haval256_4('Hello', true, '5417', 1) . PHP_EOL;

echo
"HAVAL256,5 no Salt: " . AIOHasher::haval256_5('Hello') . PHP_EOL;
echo
"HAVAL256,5 with Salt: " . AIOHasher::haval256_5('Hello', true, '5417', 1) . PHP_EOL;


  Files folder image Files  
File Role Description
Plain text file AIOHasher.class.php Class Hasher Class File
Accessible without login Plain text file example.php Example Example File

 Version Control Unique User Downloads Download Rankings  
 0%
Total:104
This week:0
All time:9,679
This week:108Up