Use require_once in examples.
This commit is contained in:
parent
82ed7d85bd
commit
6075d057d0
@ -3,9 +3,9 @@
|
||||
// USAGE: php examples/deASCIIdeCrypt.php secretkey.asc password message.asc
|
||||
// This will fail if the algo on key or message is not 3DES or AES
|
||||
|
||||
require dirname(__FILE__).'/../lib/openpgp.php';
|
||||
require dirname(__FILE__).'/../lib/openpgp_crypt_rsa.php';
|
||||
require dirname(__FILE__).'/../lib/openpgp_crypt_symmetric.php';
|
||||
require_once dirname(__FILE__).'/../lib/openpgp.php';
|
||||
require_once dirname(__FILE__).'/../lib/openpgp_crypt_rsa.php';
|
||||
require_once dirname(__FILE__).'/../lib/openpgp_crypt_symmetric.php';
|
||||
|
||||
$keyASCII = file_get_contents($argv[1]);
|
||||
$msgASCII = file_get_contents($argv[3]);
|
||||
|
@ -1,8 +1,8 @@
|
||||
<?php
|
||||
|
||||
require dirname(__FILE__).'/../lib/openpgp.php';
|
||||
require dirname(__FILE__).'/../lib/openpgp_crypt_rsa.php';
|
||||
require dirname(__FILE__).'/../lib/openpgp_crypt_symmetric.php';
|
||||
require_once dirname(__FILE__).'/../lib/openpgp.php';
|
||||
require_once dirname(__FILE__).'/../lib/openpgp_crypt_rsa.php';
|
||||
require_once dirname(__FILE__).'/../lib/openpgp_crypt_symmetric.php';
|
||||
|
||||
$key = OpenPGP_Message::parse(file_get_contents(dirname(__FILE__) . '/../tests/data/helloKey.gpg'));
|
||||
$data = new OpenPGP_LiteralDataPacket('This is text.', array('format' => 'u', 'filename' => 'stuff.txt'));
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
require dirname(__FILE__).'/../lib/openpgp.php';
|
||||
require dirname(__FILE__).'/../lib/openpgp_crypt_rsa.php';
|
||||
require_once dirname(__FILE__).'/../lib/openpgp.php';
|
||||
require_once dirname(__FILE__).'/../lib/openpgp_crypt_rsa.php';
|
||||
|
||||
$rsa = new Crypt_RSA();
|
||||
$k = $rsa->createKey(512);
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
require dirname(__FILE__).'/../lib/openpgp.php';
|
||||
require dirname(__FILE__).'/../lib/openpgp_crypt_rsa.php';
|
||||
require_once dirname(__FILE__).'/../lib/openpgp.php';
|
||||
require_once dirname(__FILE__).'/../lib/openpgp_crypt_rsa.php';
|
||||
|
||||
/* Parse secret key from STDIN, the key must not be password protected */
|
||||
$wkey = OpenPGP_Message::parse(file_get_contents('php://stdin'));
|
||||
|
Loading…
Reference in New Issue
Block a user