Class: OmniAuth::DoximityOauth2::Crypto
- Inherits:
-
Object
- Object
- OmniAuth::DoximityOauth2::Crypto
- Defined in:
- lib/omniauth-doximity-oauth2/crypto.rb
Overview
Static crypto methods
Class Method Summary collapse
Class Method Details
.create_rsa_key(n, e) ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/omniauth-doximity-oauth2/crypto.rb', line 8 def create_rsa_key(n, e) data_sequence = OpenSSL::ASN1::Sequence([ OpenSSL::ASN1::Integer(base64_to_long(n)), OpenSSL::ASN1::Integer(base64_to_long(e)) ]) asn1 = OpenSSL::ASN1::Sequence(data_sequence) OpenSSL::PKey::RSA.new(asn1.to_der) end |