Voting

: one minus one?
(Example: nine)

The Note You're Voting On

aidukas at gmail dot com
11 years ago
If empty text is encrypted, the gnupg_decrypt() function will return a boolean FALSE so if you do a strict comparison (===, !==) to track a failure it will trigger you a failure.
For failures use Exceptions:
<?php
$gpg
= new gnupg();
$gpg->seterrormode(gnupg::ERROR_EXCEPTION);
/*
.......further code.......
*/
try {
$string = $gpg->decrypt($stringToDecrypt);
} catch (
Exception $e) {
// do the Error processing
}

?>

<< Back to user notes page

To Top