Sha256: 08913d83c3c2d8e8ea6480c2cec3ab8ebbc78bb30b8e81d810e1b9531fa6bda3
Contents?: true
Size: 573 Bytes
Versions: 18
Compression:
Stored size: 573 Bytes
Contents
module Acme::Client::JWK # Make a JWK from a private key. # # private_key - An OpenSSL::PKey::EC or OpenSSL::PKey::RSA instance. # # Returns a JWK::Base subclass instance. def self.from_private_key(private_key) case private_key when OpenSSL::PKey::RSA Acme::Client::JWK::RSA.new(private_key) when OpenSSL::PKey::EC Acme::Client::JWK::ECDSA.new(private_key) else raise ArgumentError, 'private_key must be EC or RSA' end end end require 'acme/client/jwk/base' require 'acme/client/jwk/rsa' require 'acme/client/jwk/ecdsa'
Version data entries
18 entries across 18 versions & 1 rubygems