Skip to content

Instantly share code, notes, and snippets.

@kinncj
Last active June 15, 2021 20:41
Show Gist options
  • Save kinncj/1de6b1c030f18a49531547068da7152e to your computer and use it in GitHub Desktop.
Save kinncj/1de6b1c030f18a49531547068da7152e to your computer and use it in GitHub Desktop.
RSA

Run

curl https://gist.githubusercontent.com/kinncj/1de6b1c030f18a49531547068da7152e/raw/4725d0c9f174d022bf2dd56466b92c73e9f053b8/generate.sh | $SHELL
openssl genrsa -out generateRS256pair.key 2048
sleep 1
openssl rsa -in generateRS256pair.key -pubout -outform PEM -out generateRS256pair.key.pub
echo "------------"
echo "Private Key"
echo "------------"
cat generateRS256pair.key
echo "------------"
echo "Public Key"
echo "------------"
cat generateRS256pair.key.pub
rm -rf generateRS256pair.key
rm -rf generateRS256pair.key.pub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment