PHP Class ParagonIE\EasyRSA\EasyRSA

Inheritance: implements ParagonIE\EasyRSA\EasyRSAInterface
Show file Open project: paragonie/easyrsa Class Usage Examples

Public Methods

Method Description
decrypt ( string $ciphertext, PrivateKey $rsaPrivateKey ) : string Encrypt a message with defuse/php-encryption, using an ephemeral key, then encrypt the key with RSA.
encrypt ( string $plaintext, PublicKey $rsaPublicKey ) : string Encrypt a message with defuse/php-encryption, using an ephemeral key, then encrypt the key with RSA.
sign ( string $message, PrivateKey $rsaPrivateKey ) : string Sign with RSASS-PSS + MGF1+SHA256
verify ( string $message, string $signature, PublicKey $rsaPublicKey ) : boolean Verify with RSASS-PSS + MGF1+SHA256

Protected Methods

Method Description
rsaDecrypt ( string $ciphertext, PrivateKey $rsaPrivateKey ) : string Decrypt with RSAES-OAEP + MGF1+SHA256
rsaEncrypt ( string $plaintext, PublicKey $rsaPublicKey ) : string Decrypt with RSAES-OAEP + MGF1+SHA256

Method Details

decrypt() public static method

Encrypt a message with defuse/php-encryption, using an ephemeral key, then encrypt the key with RSA.
public static decrypt ( string $ciphertext, PrivateKey $rsaPrivateKey ) : string
$ciphertext string
$rsaPrivateKey PrivateKey
return string

encrypt() public static method

Encrypt a message with defuse/php-encryption, using an ephemeral key, then encrypt the key with RSA.
public static encrypt ( string $plaintext, PublicKey $rsaPublicKey ) : string
$plaintext string
$rsaPublicKey PublicKey
return string

rsaDecrypt() protected static method

Decrypt with RSAES-OAEP + MGF1+SHA256
protected static rsaDecrypt ( string $ciphertext, PrivateKey $rsaPrivateKey ) : string
$ciphertext string
$rsaPrivateKey PrivateKey
return string

rsaEncrypt() protected static method

Decrypt with RSAES-OAEP + MGF1+SHA256
protected static rsaEncrypt ( string $plaintext, PublicKey $rsaPublicKey ) : string
$plaintext string
$rsaPublicKey PublicKey
return string

sign() public static method

Sign with RSASS-PSS + MGF1+SHA256
public static sign ( string $message, PrivateKey $rsaPrivateKey ) : string
$message string
$rsaPrivateKey PrivateKey
return string

verify() public static method

Verify with RSASS-PSS + MGF1+SHA256
public static verify ( string $message, string $signature, PublicKey $rsaPublicKey ) : boolean
$message string
$signature string
$rsaPublicKey PublicKey
return boolean