Answer the question
In order to leave comments, you need to log in
How to make a reversible encryption of a number?
You need to reversibly encrypt a number of type int.
So that at the same time it remains a number of type int. Those. so that (int)$x does not break this very reversibility.
Googled, did not find ready-made options.
PHP 5.5.
Answer the question
In order to leave comments, you need to log in
As an option:
$int = 252525252;
$key = 7;
echo "<br>$int";
$enc = $int<<$key;
echo "<br>$enc";
$dec = $enc>>$key;
echo "<br>$dec";
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question