<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://kb.rvmgroup.it/index.php?action=history&amp;feed=atom&amp;title=Utilizzo_di_Gpg_in_php_per_cifrare_password</id>
	<title>Utilizzo di Gpg in php per cifrare password - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://kb.rvmgroup.it/index.php?action=history&amp;feed=atom&amp;title=Utilizzo_di_Gpg_in_php_per_cifrare_password"/>
	<link rel="alternate" type="text/html" href="https://kb.rvmgroup.it/index.php?title=Utilizzo_di_Gpg_in_php_per_cifrare_password&amp;action=history"/>
	<updated>2026-05-06T11:18:04Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.2</generator>
	<entry>
		<id>https://kb.rvmgroup.it/index.php?title=Utilizzo_di_Gpg_in_php_per_cifrare_password&amp;diff=3619&amp;oldid=prev</id>
		<title>Gabriele.vivinetto at 22:15, 9 August 2005</title>
		<link rel="alternate" type="text/html" href="https://kb.rvmgroup.it/index.php?title=Utilizzo_di_Gpg_in_php_per_cifrare_password&amp;diff=3619&amp;oldid=prev"/>
		<updated>2005-08-09T22:15:14Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 22:15, 9 August 2005&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l69&quot;&gt;Line 69:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 69:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;$recoverPassword=`$comando`;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;$recoverPassword=`$comando`;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;== Link utili ==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[http://webmonkey.wired.com/webmonkey/00/20/index3a_page5.html?tw=programming Data Encryption Tutorial  Lesson 1]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[http://pear.php.net/package/text_password Text_Password allows one to create pronounceable and unpronounceable passwords]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[http://php.morva.net/manual/it/function.crypt.php Php crypt()]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[http://paul-m-jones.com/blog/?p=134 Password problems with crypt() and htpasswd files]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Gabriele.vivinetto</name></author>
	</entry>
	<entry>
		<id>https://kb.rvmgroup.it/index.php?title=Utilizzo_di_Gpg_in_php_per_cifrare_password&amp;diff=1193&amp;oldid=prev</id>
		<title>Gabriele.vivinetto at 20:17, 9 August 2005</title>
		<link rel="alternate" type="text/html" href="https://kb.rvmgroup.it/index.php?title=Utilizzo_di_Gpg_in_php_per_cifrare_password&amp;diff=1193&amp;oldid=prev"/>
		<updated>2005-08-09T20:17:36Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 20:17, 9 August 2005&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;:&lt;/del&gt;: Gpg]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category: Gpg]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;:&lt;/del&gt;: Php]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category: Php]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;Obiettivo:&amp;#039;&amp;#039; si vuole creare un&amp;#039;applicazione che memorizzi delle passowrd in un database che siano indecifrabili, a meno di usare una chiave privata non disponibile sulla macchina. Questo è utile se si utilizza una cifratura one-way tipo &amp;#039;&amp;#039;crypt&amp;#039;&amp;#039;, ma si vuole avere la possibilità di fare un recover delle password in caso di bisogno.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;Obiettivo:&amp;#039;&amp;#039; si vuole creare un&amp;#039;applicazione che memorizzi delle passowrd in un database che siano indecifrabili, a meno di usare una chiave privata non disponibile sulla macchina. Questo è utile se si utilizza una cifratura one-way tipo &amp;#039;&amp;#039;crypt&amp;#039;&amp;#039;, ma si vuole avere la possibilità di fare un recover delle password in caso di bisogno.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Gabriele.vivinetto</name></author>
	</entry>
	<entry>
		<id>https://kb.rvmgroup.it/index.php?title=Utilizzo_di_Gpg_in_php_per_cifrare_password&amp;diff=1191&amp;oldid=prev</id>
		<title>Gabriele.vivinetto at 20:17, 9 August 2005</title>
		<link rel="alternate" type="text/html" href="https://kb.rvmgroup.it/index.php?title=Utilizzo_di_Gpg_in_php_per_cifrare_password&amp;diff=1191&amp;oldid=prev"/>
		<updated>2005-08-09T20:17:27Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Category:: Gpg]]&lt;br /&gt;
[[Category:: Php]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Obiettivo:&amp;#039;&amp;#039; si vuole creare un&amp;#039;applicazione che memorizzi delle passowrd in un database che siano indecifrabili, a meno di usare una chiave privata non disponibile sulla macchina. Questo è utile se si utilizza una cifratura one-way tipo &amp;#039;&amp;#039;crypt&amp;#039;&amp;#039;, ma si vuole avere la possibilità di fare un recover delle password in caso di bisogno.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Soluzione:&amp;#039;&amp;#039; affiancare alla cifratura one-way un sistema di chiavi pubbliche e private, tipo gpg, richiamandolo da php.&lt;br /&gt;
&lt;br /&gt;
== Preparazione della coppia di chiavi ==&lt;br /&gt;
&lt;br /&gt;
Seguire le istruzioni riportate in [[Cifrare_un_file_in_modalit%C3%A0_batch]]&lt;br /&gt;
&lt;br /&gt;
L&amp;#039;utente cifratore sarà &amp;#039;&amp;#039;www-data&amp;#039;&amp;#039; in quanto php sotto apache viene eseguito con questa utenza.&lt;br /&gt;
&lt;br /&gt;
Per importare la chiave pubblica bisognerà quindi fare:&lt;br /&gt;
&lt;br /&gt;
 su - www-data&lt;br /&gt;
 gpg --import public_key.gpg&lt;br /&gt;
&lt;br /&gt;
La chiave sarà quindi in &amp;#039;&amp;#039;/var/www/.gnupg&amp;#039;&amp;#039;. Sarebbe preferibile non renderla accessibile da web, ma in ogni caso anche se fosse prelevata, non servirebbe a nulla.&lt;br /&gt;
&lt;br /&gt;
== Listato del programma commentato ==&lt;br /&gt;
&lt;br /&gt;
La parte di codice php interessata è descrita e commentata di seguito.&lt;br /&gt;
&lt;br /&gt;
 putenv(&amp;quot;GNUPGHOME=/var/www/.gnupg&amp;quot;);&lt;br /&gt;
Definisce la variabile di sistema che indica dove sono memorizzate le chiavi&lt;br /&gt;
&lt;br /&gt;
 $comando=&amp;quot;echo &amp;quot; . $nuovapassa . &amp;quot; | gpg --batch --trust-model always -ea -r nome_chiave_pubblica&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Si costruisce la stringa del comando usato per cifrare la password $nuovapassa.&lt;br /&gt;
&lt;br /&gt;
Gnupg cifra il suo STDIN se lo riceve da uno STDOUT, ed emette sul suo STDOUT la stringa cifrata.&lt;br /&gt;
&lt;br /&gt;
Se si prova il comando dalla shell, una semplice stringa &amp;#039;12345678&amp;#039; viene cifrata come un blocco:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----BEGIN PGP MESSAGE-----&lt;br /&gt;
Version: GnuPG v1.4.1 (GNU/Linux)&lt;br /&gt;
&lt;br /&gt;
hQIOA2zl3fx0Jh2uEAf/WelfFlutFQ4z8xYMywHv+JACkL76RyHEfo/ScytZd7kP&lt;br /&gt;
MyC5eNw6kr1J8WBDRjQ2Zkm/QqU39PDW8M5vGfMYuojENgDu1mWoEOi6gbJz9FgO&lt;br /&gt;
+NlhPW5hXe6uSqLNkAWooSm0uSZXvAK28KXTCNQ9pT8f596fsEnaxbBRjdWwYtSz&lt;br /&gt;
K8pvvbrQzBDREsT6rb71aYy6YKry/AD/am/fmaJ/bP3vORxtynhdfK2CCsHFBOv1&lt;br /&gt;
TKVy05GJmDNMBzUczXHcfB49Zqes5vfZFvPOyaxaRARf3gtjSlSW3t+w03uqjeAV&lt;br /&gt;
5y9hTYeWCuCzIw73nCVZFnVlilnJOwc62fEzuEWKuwf9FSa6x4U0kjAd/tp4UjzB&lt;br /&gt;
3Q0IjTA+KVq/sq+Eo9cALRuFDZWtWeW2F1KtU7ryk24hQEQIdy8EXGF6o/r4QaKD&lt;br /&gt;
iTDi81OSWPc9d5n01d1vSsQ6dAGuN6GixBoL2YvmqnRgjHVKCSv7s/jQHa2o4KWj&lt;br /&gt;
voNYS7mh4Y+hhSF/rkjnrLDeEvju72NeSVflKWQxeNMrpMUEFU05bx+ZpH9knRlp&lt;br /&gt;
0dKYG6Cf977clyF8yXnS6Y/JzCnpzG1bMwT7w4XYMNy61zY5r4xkoF1/rcX8Kjqx&lt;br /&gt;
btXCqwrOKmkm471J54fQGkYITrya2HM/i4meO5AheNvz3iSgUBnefbqPWGlXTwIa&lt;br /&gt;
x9JEAcqHNf58Xns1AVbKC1mcL5Hh6oSz4gmQjDW2z1iPWr+Y92qkvsYe7OmW/t7d&lt;br /&gt;
QuMID6nRHYqgZYY/AA/IoqyCvcshBRo=&lt;br /&gt;
=M+uz&lt;br /&gt;
-----END PGP MESSAGE-----&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Va da se che questa stringa va salvata in un campo di mysql di tipo &amp;#039;&amp;#039;LONGTEXT&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
 $recoverPassword=`$comando`;&lt;br /&gt;
&lt;br /&gt;
Per memorizzare in una variabile lo STDOUT di un programma bisogna utilizzare l&amp;#039;operatore BACKQUOTES &amp;quot;`&amp;quot; , similmente alla shell bash.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Listato del programma ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
putenv(&amp;quot;GNUPGHOME=/var/www/.gnupg&amp;quot;);&lt;br /&gt;
$comando=&amp;quot;echo &amp;quot; . $nuovapassa . &amp;quot; | gpg --batch --trust-model always -ea -r nome_chiave_pubblica&amp;quot;;&lt;br /&gt;
$recoverPassword=`$comando`;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gabriele.vivinetto</name></author>
	</entry>
</feed>