public function __construct()

in src/Crypto/MasterRsaCipher.php [39:73]


    public function __construct(
        ?string $publicKey = null,
        ?string $privateKey = null,
        $matDesc = null
    )
    {
        $this->publicKey = $publicKey;
        $this->publicKeyResource = null;
        if ($publicKey != null) {
            $ret = openssl_pkey_get_public($publicKey);
            if ($ret === false) {
                throw new \InvalidArgumentException('RSA key format is not supported');
            }
            $this->publicKeyResource = $ret;
        }

        $this->privateKey = $privateKey;
        if ($privateKey != null) {
            $ret = openssl_pkey_get_private($privateKey);
            if ($ret === false) {
                throw new \InvalidArgumentException('RSA key format is not supported');
            }
            $this->privateKeyResource = $ret;
        }

        $this->matDesc = null;
        if (\is_array($matDesc)) {
            $val = json_encode($matDesc);
            if ($val !== false) {
                $this->matDesc = $val;
            }
        } else if (is_string($matDesc)) {
            $this->matDesc = $matDesc;
        }
    }