Skip to content

Commit 7b16958

Browse files
Update README.md
1 parent 2672bd9 commit 7b16958

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

README.md

+17-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11

22
# php-crypto library
33

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.
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+
**shift-reality/php-crypto is licensed under the Apache License 2.0.**
56

67
**Installation (composer):**
78

@@ -17,22 +18,32 @@ A Pure PHP (without any external PHP-extension) Implementation of BLAKE-256, GRO
1718

1819
0. Register default algo:
1920

20-
`Hasher::regBuiltinAlgos();`
21+
`\Shift196\AKashLib\Hasher::regBuiltinAlgos();`
2122

2223
1. Register own hash function(algo):
2324

24-
`Hasher::registerAlgo('MYHASH', new MyHashImpl());`
25+
`\Shift196\AKashLib\Hasher::registerAlgo('MYHASH', new MyHashImpl());`
2526

26-
`MyHashImpl` should implement `IHashFunction` interface.
27+
`MyHashImpl` should implement `\Shift196\AKashLib\IHashFunction` interface.
2728

2829
2. Make hash of hex-encoded data:
2930

3031
`$algo = 'BLAKE256 or GROESTL256 or JH256 or SKEIN256 or KECCAK256';`
3132

32-
`$hashHex = Hasher::doHash($algo, InputDataSupplier::forHex($dataHex))->hex(TRUE);`
33+
`$hashHex = \Shift196\AKashLib\Hasher::doHash($algo, \Shift196\AKashLib\InputDataSupplier::forHex($dataHex))->hex(TRUE);`
3334

34-
!! Don't use internal classes from `Shift196\AKashLib\Util` it can be changed without any notifications !!
35+
3. Create own data supplier:
36+
37+
Just extend `\Shift196\AKashLib\InputDataSupplier` and implement abstract method `getInputData`.
38+
39+
!!!
40+
!!! WARNING !!!
41+
!!!
42+
!!! Don't use internal classes from `\Shift196\AKashLib\Util` it can be changed without any notifications !!!
43+
!!!
3544

3645
**TODO**:
3746

3847
-use PHPUnit for testing
48+
-add more algos
49+
-write Perf & Password class

0 commit comments

Comments
 (0)