Decrypt Page  encrypt.php

8X"þ -LʅqMÁi$BO9hWYrr k峞%Yr ]`UTIQȉU Ҩqm~Xu=k<1huInjVuInyzx+VlyjMlU(
 
Comments :
The tiny batch of red chars above it's nothing else than...
  ...the encrypted format of the green text you see below :

This is the text to encrypt and write in a file to save-store it.
...the same can be done in a database :-)
Later when we want to access its content we will then need :
1) The encrypted content.
2) The key that we used when encrypting.
3) The vector value $iv ...this changes everytime it is created
  ...so we must save it while encrypting.
 
These are the 4 interacting files :   1) encrypt.php
2) decrypt.php
3) iv.txt
4) string.txt
The scenario is that the file string.txt contains all your passwords and you are travelling without your Pc. You just need to remember the $key you have used to be able to surf to your site and decrypt the file string.txt
...if your site has been hacked the content of your file will not be of any use to the hacker as it would be an unreadable text

I simply have set the $_string and $key variables in encrypt.php as fixed values, you will send those as post when processing the file encrypt.php ... then [to access-decrypt] you have to to process the file decrypt.php by posting the $key you have used while encrypting. The vector variable will be retrieven by this file [decrypt.php] automatically by reading the file iv.txt
The greater is the file you are going to encrypt ...the greater will be the encrypted string that will be written in the file string.txt
You will need to password protect the file encrypt.php and back up the file string.txt on your Pc
...Split and modify the code of files encrypt.php & decrypt.php for your service-use.
...Arrange to send as a post-variable the value of the string to encrypt.
...Save the "$key" as a password and send its value as well as a post-variable whenever you need to decrypt your text.