Created
June 13, 2020 22:20
-
-
Save snyff/1c48bfe9fd9ee8ed5e11d764d26ea7a3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
k = OpenSSL::PKey::RSA.new File.read 'private.pem' | |
pub = k.public_key | |
jwks = { | |
"keys"=> [ | |
{ | |
"kty"=> "RSA", | |
"use"=> "sig", | |
"alg": "RS256", | |
"kid"=> "pentesterlab", | |
"n" => Base64.urlsafe_encode64(pub.n.to_s(2), padding: false), | |
"e" => Base64.urlsafe_encode64(pub.e.to_s(2), padding: false) | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment