顧客データが関係しているので、これを安全に行いたいと思っています。
私は共有ホスティングを使用しているため、コマンドラインから GNUPG を使用していますが、PHP クラスは使用できません。したがって、私のコードは次のとおりです。
putenv("GNUPGHOME=/home/me/.gnupg");
$gpg = '/usr/bin/gpg';
$gpgrecipient = 'email';
$mailrecp = 'email';
$plain = 'Here is the encrypted Text Here is the encrypted Text Here is the
encrypted Text Here is the encrypted Text Here is the encrypted Text Here is the
encrypted Text Here is the encrypted Text Here is the encrypted Text Here is the
encrypted Text';
$encrypted = shell_exec("echo {$plain} | {$gpg} --no-auto-check-trustdb --lock-never -e -a -r {$gpgrecipient} ");
$plain
では、データの整合性を維持しながら をエスケープするにはどうすればよいでしょうか?
使用するだけescapeshellcmd()
では、フォーマットが台無しになる傾向があります。
共有ホスティングの機密データであるため、何かをファイルに保存することに少し不安があります。