Skip to content

Instantly share code, notes, and snippets.

@lkdocs
Created September 11, 2013 16:51
Show Gist options
  • Save lkdocs/6526476 to your computer and use it in GitHub Desktop.
Save lkdocs/6526476 to your computer and use it in GitHub Desktop.
require 'openssl'
def generate_RSA(bits=2048)
# Generates an RSA keypair
# @bits The key length in bits
OpenSSL::PKey::RSA.new(bits)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment