Skip to content

Instantly share code, notes, and snippets.

Avatar

Anderson Rocha Pereira wans05

View GitHub Profile
@wans05
wans05 / openssl_encrypt_decrypt.php
Created Jul 29, 2019 — forked from joashp/openssl_encrypt_decrypt.php
Simple PHP encrypt and decrypt using OpenSSL
View openssl_encrypt_decrypt.php
<?php
/**
* simple method to encrypt or decrypt a plain text string
* initialization vector(IV) has to be the same when encrypting and decrypting
*
* @param string $action: can be 'encrypt' or 'decrypt'
* @param string $string: string to encrypt or decrypt
*
* @return string
*/
You can’t perform that action at this time.