Skip to content

Instantly share code, notes, and snippets.

@giper45
Created February 28, 2019 11:36
Show Gist options
  • Save giper45/f5056883f6f743a7f4150f029cfa70e4 to your computer and use it in GitHub Desktop.
Save giper45/f5056883f6f743a7f4150f029cfa70e4 to your computer and use it in GitHub Desktop.
OUTPUT_PUBLIC_KEY_PATH="pub.txt"
HEX_MODULUS=$(openssl rsa -pubin -in $OUTPUT_PUBLIC_KEY_PATH -modulus | grep 'Modulus=' | cut -d'=' -f 2)
ruby<<EOF
p "$HEX_MODULUS".to_i(16).to_s(10)
EOF
openssl rsa -pubin -in $OUTPUT_PUBLIC_KEY_PATH -text | grep 'Exponent'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment