Sha256: e1d2ff6e1b63509a925f31537d540b69629c34db1e1f0a9156c3e8a9ed53d20a

Contents?: true

Size: 329 Bytes

Versions: 25

Compression:

Stored size: 329 Bytes

Contents

require 'openssl'

module SoarAuthenticationToken
  class KeypairGenerator
    def generate
      private_key = OpenSSL::PKey::EC.new 'secp521r1'
      private_key.generate_key
      public_key = OpenSSL::PKey::EC.new private_key
      public_key.private_key = nil
      [private_key.to_pem, public_key.to_pem]
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
soar_authentication_token-7.1.1 lib/soar_authentication_token/keypair_generator.rb
soar_authentication_token-7.1.0 lib/soar_authentication_token/keypair_generator.rb
soar_authentication_token-7.0.1 lib/soar_authentication_token/keypair_generator.rb
soar_authentication_token-7.0.0 lib/soar_authentication_token/keypair_generator.rb
soar_authentication_token-6.1.1 lib/soar_authentication_token/keypair_generator.rb
soar_authentication_token-6.1.0 lib/soar_authentication_token/keypair_generator.rb
soar_authentication_token-6.0.9 lib/soar_authentication_token/keypair_generator.rb
soar_authentication_token-6.0.8 lib/soar_authentication_token/keypair_generator.rb
soar_authentication_token-6.0.7 lib/soar_authentication_token/keypair_generator.rb
soar_authentication_token-6.0.5 lib/soar_authentication_token/keypair_generator.rb
soar_authentication_token-6.0.4 lib/soar_authentication_token/keypair_generator.rb
soar_authentication_token-6.0.3 lib/soar_authentication_token/keypair_generator.rb
soar_authentication_token-6.0.2 lib/soar_authentication_token/keypair_generator.rb
soar_authentication_token-6.0.1 lib/soar_authentication_token/keypair_generator.rb
soar_authentication_token-6.0.0 lib/soar_authentication_token/keypair_generator.rb
soar_authentication_token-5.0.3 lib/soar_authentication_token/keypair_generator.rb
soar_authentication_token-5.0.2 lib/soar_authentication_token/keypair_generator.rb
soar_authentication_token-5.0.1 lib/soar_authentication_token/keypair_generator.rb
soar_authentication_token-5.0.0 lib/soar_authentication_token/keypair_generator.rb
soar_authentication_token-4.0.1 lib/soar_authentication_token/keypair_generator.rb