Skip to content

Commit dfe1fba

Browse files
authored
Update README.md
add the openssl key make method. ~~~shell # get the private and public key with openssl openssl genrsa -out private.key 2048 openssl rsa -in private.key -pubout > pubkey.key # get private and pub key with ssh-keygen ssh-keygen -t rsa -b 2048 -C "[email protected]" openssl rsa -in id_rsa -pubout > id_rsa_pub.key ~~~
1 parent bac0422 commit dfe1fba

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,18 @@ $decoded = JWT::decode($jwt, $key, array('HS256'));
6161
?>
6262
```
6363
Example with RS256 (openssl)
64+
65+
~~~shell
66+
# get the private and public key with openssl
67+
openssl genrsa -out private.key 2048
68+
openssl rsa -in private.key -pubout > pubkey.key
69+
70+
# get private and pub key with ssh-keygen
71+
ssh-keygen -t rsa -b 2048 -C "[email protected]"
72+
openssl rsa -in id_rsa -pubout > id_rsa_pub.key
73+
74+
~~~
75+
6476
----------------------------
6577
```php
6678
<?php

0 commit comments

Comments
 (0)