Property | Type | Description | |
---|---|---|---|
$_key | string | ||
$_mcrypt | resource |
Method | Description | |
---|---|---|
__construct ( string | array $options = [] ) | Crypt constructor. | |
decrypt ( string $text, string $key = null ) : string | Decrypts an encrypted text | |
encrypt ( string $text, string $key = null ) : string | Encrypts a text |
public __construct ( string | array $options = [] ) | ||
$options | string | array |
echo $crypt->decrypt($encrypted, "decrypt password");
$encrypted = $crypt->encrypt("Ultra-secret text", "encrypt password");