Implement EVP\Cipher::encrypt function