Skip to content

Commit 02f45a7

Browse files
Create README.md
1 parent bddf179 commit 02f45a7

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

README.md

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
2+
# php-crypto library
3+
4+
A Pure PHP (without any external PHP-extension) Implementation of BLAKE-256, GROESTL-256, JH-256, SKEIN-256 and KECCAK-256 hashing (cryptography) algorithms.
5+
6+
**Installation (composer):**
7+
8+
0. Add git-repository:
9+
10+
`"repositories": [ { "url": "https://github.com/shift-reality/php-crypto.git", "type": "git", "reference": "newlib" } ]`
11+
12+
1. require library:
13+
14+
`"require": { "shift196/lib-akash" }`
15+
16+
**Usage:**
17+
18+
0. Register default algo:
19+
20+
`Hasher::regBuiltinAlgos();`
21+
22+
1. Register own hash function(algo):
23+
24+
`Hasher::registerAlgo('MYHASH', new MyHashImpl());`
25+
26+
`MyHashImpl` should implement IHashFunction interface.
27+
28+
2. Make hash of hex-encoded data:
29+
30+
`$algo = 'BLAKE256 or GROESTL256 or JH256 or SKEIN256 or KECCAK256';`
31+
32+
`$hashHex = Hasher::doHash($algo, InputDataSupplier::forHex($dataHex))->hex(TRUE);`

0 commit comments

Comments
 (0)