Configuration File Encrypted Messenger PHP
Configuration File
Encrypted Messenger PHP
define
The define() function defines a constant.
Constants are much like variables, except for the following differences:
A constant’s value cannot be changed after it is set
Constant names do not need a leading dollar sign ($)
Constants can be accessed regardless of scope
Constant values can only be strings and numbers
base64_encode
Encodes the given data with base64.
This encoding is designed to make binary data survive transport through transport layers that are not 8-bit clean, such as mail bodies.
Base64-encoded data takes about 33% more space than the original data.
openssl_random_pseudo_bytes
Generates a string of pseudo-random bytes, with the number of bytes determined by the length parameter.
It also indicates if a cryptographically strong algorithm was used to produce the pseudo-random bytes, and does this via the optional crypto_strong parameter.
It’s rare for this to be FALSE, but some systems may be broken or old.
hash
hash Generate a hash value (message digest)
Returns a string containing the calculated message digest as lowercase hexits unless raw_output is set to true in which case the raw binary representation of the message digest is returned.
Create a file named secured-configuration.php
<?php
//***********************************************************************************************
define('XFIRSTXKEYX','0XSwEiFiGkSQD0EWN9yKOFMKyRz/69/g5h7uVWt+FCLTWGs0+sV1J+mneo9vQR9Z17clLZJg+MDj2+fxkzA5mQ==');
//***********************************************************************************************
define('XSECONDXKEYX','4G871iNDUFmXSRbtgd7AvNOFaf8gNHWLa6xBMNiS6qRBhSYnBPWuNeEwMqYMNVi197B26PFLdsbqbUsvdLgr6w==');
//***********************************************************************************************
define('XTHIRDXKEYX','cXkkx+eD4HXzZxwJlUj4bGuX01DFK3RGjka6Yfatu0aOAg+UBM/cbjEDg3y1oQ03cxb9LMdANvgtviEpziB8sg==');
//***********************************************************************************************
define('XFOURTHXKEYX','Rsf1JVTFJfYuDaig52GhCkvf4qaO3m423q03jMyG+imRWwvO4YZLyFOjKCcOQpKB9jtNXhQrKcee6C5YZ0kMmw==');
//***********************************************************************************************
define('XFIFTHXKEYX','fDtUlH8OAbcVikMq92OGc0Wu3jpuXcQCRqGJrVXQfLvgyOBeYHRSlmE74sI9gXBcwJJnz0jkElP/e8pAo3GV6w==');
//***********************************************************************************************
define('XSIXTHXKEYX','TeP/fdNaxrbJHnd8Ro/c92n4dx9e4zRg7Cfc6rcT05cBj5l7ZORenVvFg0m6cCNgHRuMRExh1ZMLalXPQPLfEg==');
//***********************************************************************************************
define('XSEVENTHXKEYX','7T1Rn3m0zGNJIUlcOuVgagcdNlrWWuM2qI/SG/50UCVfcdnErfHzkmqM+i03UQO7h5/KplJ0Dvk0nbaNWVPgZA==');
//***********************************************************************************************
define('XEIGHTHXKEYX','9oYg5jfGZEBiV2ME6GVpxkd+ZEYR5vFmPZgriDs17qWsOuZuIJZFzfWgYZwke4Cx6YRogwFwriA08bbw8VZVyQ==');
//***********************************************************************************************
// echo base64_encode( openssl_random_pseudo_bytes(64) );
//***********************************************************************************************
define('XFIRSTNX','95843e39132494261405de1e04f11564ea651b414f8b1a40ee2b77c4c7330072');
//***********************************************************************************************
define('XSECONDNX','1191ccac4d96906a1843c9ab32efb6135321a13e20c0a6ebc5d1da50c4be8b49');
//***********************************************************************************************
define('XTHIRDNX','15b22e60fbb2d9754b6b36f8c1950b8fab054e579ed5c578aaf8395e1e93a32e');
//***********************************************************************************************
// echo hash( 'sha3-256' , openssl_random_pseudo_bytes(32) ) ;
//***********************************************************************************************
define('XSITEKEYX','site_key');
//***********************************************************************************************
define('XSECRETKEYX','secret_key');
//***********************************************************************************************
// https://www.google.com/recaptcha/admin
//***********************************************************************************************
define('XDOMAINX','omid-bahrami.com');
//***********************************************************************************************
define('XSSLX',true);
//***********************************************************************************************
define('XCXPX',604800);
//***********************************************************************************************
define('XXXSGNSDBHXXX','localhost');
//***********************************************************************************************
define('XXXSGNSDBNXXX','database_name');
//***********************************************************************************************
define('XXXSGNSDBUXXX','database_username');
//***********************************************************************************************
define('XXXSGNSDBPXXX','database_password');
//***********************************************************************************************
?>
Full structure is available at Encrypted Messenger PHP