Zend\Crypt\PublicKey\Rsa
Implementation of the RSA public key encryption algorithm.
Synopsis
class Rsa
{
- // constants
- const MODE_AUTO = 1;
- const MODE_BASE64 = 2;
- const MODE_RAW = 3;
- // members
- protected RsaOptions $options;
- // methods
- public static Rsa factory()
- public void __construct()
- public Rsa setOptions()
- public RsaOptions getOptions()
- public string getOpensslErrorString()
- public string sign()
- public bool verify()
- public string encrypt()
- public string decrypt()
- public Rsa generateKeys()
Constants
Name | Value |
---|---|
MODE_AUTO | 1 |
MODE_BASE64 | 2 |
MODE_RAW | 3 |
Members
protected
- $options — Zend\Crypt\PublicKey\RsaOptions
Methods
public
- __construct() — Class constructor
- decrypt() — Decrypt with private/public key
- encrypt() — Encrypt with private/public key
- factory() — RSA instance factory
- generateKeys() — Generate new private/public key pair
- getOpensslErrorString() — Return last openssl error(s)
- getOptions() — Get options
- setOptions() — Set options
- sign() — Sign with private key
- verify() — Verify signature with public key