Encryption & Decryption
The following Ruby encryption examples use the OpenSSL cryptography toolkit.
Encrypt message using RSA public key with PKCS1-OAEP padding:
def encrypt_RSA(key, message='my plaintext string')
Decrypt a package using RSA private key with PKCS1-OAEP padding:
def decrypt_RSA(key, package)
LaunchKey links to user contributed code as a resource to its community. LaunchKey does not in any way
guarantee or warrant the quality and security of these code bases. User contributed code is supported by the
creators. If you do find a link from the site to user contributed code that is malicious or inappropriate in any
way, please report that link to LaunchKey immediately and we will investigate the claim. Submit any issue to
LaunchKey support at https://launchkey.com./support.