cvs: peardoc /en/package/encryption/crypt-gpg examples.xml

From: Date: Mon, 17 Nov 2008 20:01:24 +0000
Subject: cvs: peardoc /en/package/encryption/crypt-gpg examples.xml
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-11278@lists.php.net to get a copy of this message
cweiske Mon Nov 17 20:01:24 2008 UTC Modified files: /peardoc/en/package/encryption/crypt-gpg examples.xml Log: Fix Doc Bug #15054: small error in documentation http://cvs.php.net/viewvc.cgi/peardoc/en/package/encryption/crypt-gpg/examples.xml?r1=1.5&r2=1.6&diff_format=u Index: peardoc/en/package/encryption/crypt-gpg/examples.xml diff -u peardoc/en/package/encryption/crypt-gpg/examples.xml:1.5 peardoc/en/package/encryption/crypt-gpg/examples.xml:1.6 --- peardoc/en/package/encryption/crypt-gpg/examples.xml:1.5 Mon Oct 20 15:40:42 2008 +++ peardoc/en/package/encryption/crypt-gpg/examples.xml Mon Nov 17 20:01:24 2008 @@ -54,7 +54,6 @@ <informalexample> <programlisting role="php"><![CDATA[ <?php - require_once 'Crypt/GPG.php'; $gpg = new Crypt_GPG(); @@ -62,7 +61,6 @@ $signature = $gpg->signFile($filename, Crypt_GPG::SIGN_MODE_DETACHED); echo "Package signature is: ", $signature, "\n"; - ?> ]]></programlisting> </informalexample> @@ -80,7 +78,6 @@ <informalexample> <programlisting role="php"><![CDATA[ <?php - require_once 'Crypt/GPG.php'; $signature = <<<DATA @@ -100,7 +97,6 @@ } else { echo "Package is invalid!\n"; } - ?> ]]></programlisting> </informalexample> @@ -125,7 +121,6 @@ $gpg->addEncryptKey('test@example.com'); // you can use any fopen-able stream $gpg->encryptFile('http://example.com/file.html', '~/file.html.asc'); - ?> ]]></programlisting> </informalexample> @@ -143,7 +138,6 @@ <informalexample> <programlisting role="php"><![CDATA[ <?php - require_once 'Crypt/GPG.php'; // ... connect to database ... @@ -158,10 +152,9 @@ $sql = sprintf('insert into payments (card_type, card_number) ' . 'values (%s, %s)', mysql_real_escape_string($card_type), - mysql_real_escape_string($card_number)); + mysql_real_escape_string($encrypted)); mysql_exec($sql); - ?> ]]></programlisting> </informalexample> @@ -179,7 +172,6 @@ <informalexample> <programlisting role="php"><![CDATA[ <?php - require_once 'Crypt/GPG.php'; // ... connect to database ... @@ -193,7 +185,6 @@ echo "Card type: ", $row->card_type, "\n"; echo "Card number: ", $gpg->decrypt($row->card_number), "\n"; } - ?> ]]></programlisting> </informalexample> @@ -211,14 +202,12 @@ <informalexample> <programlisting role="php"><![CDATA[ <?php - require_once 'Crypt/GPG.php'; $gpg = new Crypt_GPG(); echo "My public key is: ", $gpg->exportPublicKey('test@example.com'), "\n"; echo "My key fingerprint is: ", $gpg->getFingerprint('test@example.com', Crypt_GPG::FORMAT_CANONICAL), "\n"; - ?> ]]></programlisting> </informalexample> @@ -236,7 +225,6 @@ <informalexample> <programlisting role="php"><![CDATA[ <?php - require_once 'Crypt/GPG.php'; $data = 'Hello, World!'; @@ -246,7 +234,6 @@ $signedData = $gpg->sign($data, Crypt_GPG::SIGN_MODE_CLEAR); echo "Clearsigned message is: ", $signedData, "\n"; - ?> ]]></programlisting> </informalexample> @@ -264,7 +251,6 @@ <informalexample> <programlisting role="php"><![CDATA[ <?php - require_once 'Crypt/GPG.php'; $signedData = <<<DATA @@ -287,7 +273,6 @@ } else { echo "Message is invalid!\n"; } - ?> ]]></programlisting> </informalexample>

« previous php.pear.doc (#11278) next »