-
Notifications
You must be signed in to change notification settings - Fork 0
/
crypt.php
47 lines (35 loc) · 1.35 KB
/
crypt.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
error_reporting(0); // Turn off all error reporting.
## ENCRYPT FUNCTION
function enroot($pass) {
$alpha = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
$beta = 'nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM';
$abwords = strtr($pass, $alpha, $beta);
$gamma = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
$theta = 'defghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcd';
$gtwords = strtr($abwords, $gamma, $theta);
$basewords = base64_encode($gtwords);
$equal = '==';
$star = '*';
$eswords = strtr($basewords, $equal, $star);
$wwwords = wordwrap($eswords, 5, "-", true);
return $wwwords;
}
## DECRYPT FUNCTION
function deroot($pass) {
$negative = '-';
$empty = '';
$newords = strtr($pass, $negative, $empty);
$star = '*';
$equal = '==';
$sewords = strtr($newords, $star, $equal);
$basewords = base64_decode($sewords);
$alpha = 'defghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcd';
$beta = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
$abwords = strtr($basewords, $alpha, $beta);
$gamma = 'nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM';
$theta = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
$endwords = strtr($abwords, $gamma, $theta);
return $endwords;
}
?>