@@ -6,7 +6,7 @@ PHP string encrypt and decode function. From discuz.
66Just add this line to your ` composer.json ` file:
77
88``` json
9- "wilon/authcode" : " ^1.1"
9+ "wilon/authcode" : " ^1.1.1 "
1010```
1111
1212or
@@ -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