method

public_encrypt

v2_5_5 - Show latest stable - Class: OpenSSL::PKey::RSA
public_encrypt(p1, p2 = v2)
public

Encrypt string with the public key. padding defaults to PKCS1_PADDING. The encrypted string output can be decrypted using #private_decrypt.