comparison vendor/pear/crypt_gpg/tools/dump-keyring.php @ 0:1e000243b222

vanilla 1.3.3 distro, I hope
author Charlie Root
date Thu, 04 Jan 2018 15:50:29 -0500
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:1e000243b222
1 <?php
2
3 /*
4 * Helper script for test keyring generation
5 *
6 * See build-keyring.sh
7 *
8 * Copyright (c) 2008 Michael Gauthier
9 */
10
11 echo "<?php\n\n";
12
13 $HOMEDIR = $_SERVER['argv'][1];
14
15 $dataFiles = array(
16 'pubring' => 'pubring.gpg',
17 'secring' => 'secring.gpg',
18 'trustdb' => 'trustdb.gpg',
19 'random_seed' => 'random_seed'
20 );
21
22
23 echo "\n// For TestCase\n";
24
25 foreach ($dataFiles as $key => $file) {
26 echo " // {{{ " . $key . " data\n";
27 echo " $" . $key . "Data = <<<TEXT\n";
28
29 $content = file_get_contents($HOMEDIR . '/' . $file);
30 $content = base64_encode($content);
31 $content = wordwrap($content, 60, "\n", true);
32
33 echo $content;
34
35 echo "\n\nTEXT;\n";
36 echo " // }}}\n";
37 }
38
39 echo "\n?>\n";
40
41 ?>