Kerify is a simple software to provide a easiest way to check the PGP Signature, this all the source-code from kerify.org.
- GnuPG for PHP
- JQuery already in
/html/js/vendor
- Bootstrap already in
/html/js/vendor
and/html/css/vendor
You can host your own Kerify.org for free or can use the lib/Kerify.php
in your project to simplify the GnuPG
, this only allow verify signature and encrypt the message, this also need the GnuPG library
, in alternative you can use the Kerify Server to do the job.
$Kerify = new Kerify($key, $text);
$Kerify->import();
var_dump( $Kerify->signature() );
$Kerify = new Kerify($key, $text);
$Kerify->import();
var_dump( $Kerify->encrypt() );
This not recommended!
$ch = curl_init('http://api.kerify.org/signature.php');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POSTFIELDS => http_build_query([
'key' => $key,
'text' => $text
])
]);
$json = json_decode(curl_exec($ch), true);
$code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $code === 200 ? 'Yeah!' : 'Opss!';
$ch = curl_init('http://api.kerify.org/encrypt.php');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POSTFIELDS => http_build_query([
'key' => $key,
'text' => $text
])
]);
$json = json_decode(curl_exec($ch), true);
$code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $code === 200 ? $json['response'] : 'Opss!';