Skip to content

Instantly share code, notes, and snippets.

@lkdocs
Created September 11, 2013 16:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lkdocs/6526445 to your computer and use it in GitHub Desktop.
Save lkdocs/6526445 to your computer and use it in GitHub Desktop.
require 'openssl'
def decrypt_RSA(key, package)
key.private_decrypt(package, OpenSSL::PKey::RSA::PKCS1_OAEP_PADDING)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment