<font color="#007700"><font color="#0000BB">php <br> $gpg </font><font color="#007700">= </font><font color="#DD0000">'/usr/bin/gpg'</font><font color="#007700">; <br> </font><font color="#0000BB">$passphrase </font><font color="#007700">= </font><font color="#DD0000">'My secret pass phrase.'</font><font color="#007700">; <br> </font><font color="#0000BB">$encrypted_file </font><font color="#007700">= </font><font color="#DD0000">'foo.gpg'</font><font color="#007700">; <br> </font><font color="#0000BB">$unencrypted_file </font><font color="#007700">= </font><font color="#DD0000">'foo.txt'</font><font color="#007700">; <br><br> echo </font><font color="#0000BB"><a target="_blank" href="http://devzone.zend.com/manual/function.shell-exec.php" style="text-decoration: none; color: rgb(0, 81, 168); border-bottom-width: 1px; border-bottom-style: dotted; border-bottom-color: rgb(0, 81, 168); ">shell_exec</a></font><font color="#007700">(</font><font color="#DD0000">"echo $passphrase | $gpg --passphrase-fd 0 -o $unencrypted_file -d $encrypted_file"</font><font color="#007700">); <br></font><font color="#0000BB">?> <br></font></font>
<font color="#007700"></font>
No comments:
Post a Comment