src/Ease/Sand.php
public static function easeEncrypt($textToEncrypt, $encryptKey)
    {
        $encryption_key = base64_decode($encryptKey);
        $iv             = openssl_random_pseudo_bytes(openssl_cipher_iv_length('aes-256-cbc'));
        $encrypted      = openssl_encrypt($textToEncrypt, 'aes-256-cbc',
            $encryption_key, 0, $iv);
        return base64_encode($encrypted.'::'.$iv);
    }
public static function easeEncrypt($textToEncrypt, $encryptKey)
    {
        $encryption_key = base64_decode($encryptKey);
        $iv             = openssl_random_pseudo_bytes(openssl_cipher_iv_length('aes-256-cbc'));
        $encrypted      = openssl_encrypt($textToEncrypt, 'aes-256-cbc',
            $encryption_key, 0, $iv);
        return base64_encode($encrypted.'::'.$iv);
    }
Encrypt.
Šifrování.

@param string $textToEncrypt plaintext
@param string $encryptKey    klíč

@return string encrypted text