For smart Primates & ROBOTS (oh and ALIENS ).

Blogroll

Thursday, October 10, 2013

openssl_encrypt openssl_decrypt in php

openssl_encrypt openssl_decrypt in php

$method = 'aes-128-ecb';
$iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length($method));
$msg="Hi this is the testing for encoding and decoding";

$en=openssl_encrypt($msg, $method, 'def', true, $iv);
echo $en;

$de=openssl_decrypt($en, $method, 'def', true, $iv);
echo $de;

Share:

0 comments:

Post a Comment

Add Dependent Scripts

   here is the code that allow to add dependent script :         <script>         const addDependentScripts = async function( scriptsT...

Ads Inside Post

Powered by Blogger.

Arsip

Blog Archive