File: crypt_test.php

package info (click to toggle)
postfixadmin 3.3.15%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,816 kB
  • sloc: php: 10,120; perl: 1,069; sh: 643; python: 169; xml: 62; sql: 3; makefile: 2
file content (31 lines) | stat: -rw-r--r-- 565 bytes parent folder | download | duplicates (3)
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
<?php

require_once('crypt.php');
require_once('dovecot_crypt.php');





$test = new DovecotCrypt('test');
$test->crypt('CRYPT');
echo "CRYPT:\n\n";
echo "Crypted: ".$test->get()."\n";
if ($test->verify('CRYPT', $test->get())) {
    echo "Varified: true\n";
} else {
    echo "Varified: false\n";
}
echo "\n";


$test2 = new DovecotCrypt('test2');
$test2->crypt('CRAM-MD5');
echo "CRAM_MD5:\n\n";
echo "Crypted: ".$test2->get()."\n";
if ($test2->verify('CRAM-MD5', $test2->get())) {
    echo "Varified: true\n";
} else {
    echo "Varified: false\n";
}
echo "\n";