abc

Share This blog with your friends, so that we can improve more & more . our aim is to easy & simple way of learning.

12/15/2020

Encryption and Decryption in PHP

Encryption means convert to such form which is not easy to understand .

base64_encode which encrypt current string or data , also helpful to store secure data.

base64_decode which decrypt encrypted data. 


<?php


$var1 = 'test'; 


echo base64_encode($var1); 


//dGVzdA==


echo '<p>'.base64_decode('dGVzdA');

?>


md5 encryption - which cannot decode - one way encryption


<?php

$sampl = 'sample text here';


echo md5($sampl);


?>


No comments:

Post a Comment

An Introduction to the Laravel Framework: What It Is and Why You Should Use It

  If you're a PHP developer looking for a modern, efficient, and powerful framework to build web applications, look no further than Lara...