Skip to content

Commit 07faad7

Browse files
committed
readme
1 parent d1d26c7 commit 07faad7

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ PHP string encrypt and decode function. From discuz.
66
Just add this line to your `composer.json` file:
77

88
```json
9-
"wilon/authcode": "^1.1"
9+
"wilon/authcode": "^1.1.1"
1010
```
1111

1212
or
@@ -19,17 +19,17 @@ composer require wilon/authcode
1919

2020
```php
2121
<?php
22-
use Wilon\Authcode;
2322

24-
$key = 'IoUwe#(#FFFsfoaHFfa';
25-
echo $auth = Authcode::encode('String', $key), '<br>';
26-
echo $result = Authcode::decode($auth, $key), '<br>';
27-
echo $result2 = Authcode::decode($auth, 'otherKey'), '<br>'; # Can't get 'String'
23+
use Wilon\Authcode;
2824

29-
// Use expiry.
30-
echo $auth = Authcode::encode('String', $key, 60), '<br>';
31-
sleep(61);
32-
echo $result = Authcode::decode($auth, $key), '<br>'; # Can't get 'String'
25+
$key = 'IoUwe#(#FFFsfoaHFfa';
26+
echo $auth = Authcode::encode('String', $key), '<br>';
27+
echo $result = Authcode::decode($auth, $key), '<br>';
28+
echo $result2 = Authcode::decode($auth, 'otherKey'), '<br>'; # Can't get 'String'
3329

30+
// Use expiry.
31+
echo $auth = Authcode::encode('String', $key, 60), '<br>';
32+
sleep(61);
33+
echo $result = Authcode::decode($auth, $key), '<br>'; # Can't get 'String'
3434

3535
```

0 commit comments

Comments
 (0)