crc24 was not encoded
This commit is contained in:
parent
6b8445737e
commit
af3643c919
@ -3,6 +3,9 @@
|
|||||||
require dirname(__FILE__).'/../lib/openpgp.php';
|
require dirname(__FILE__).'/../lib/openpgp.php';
|
||||||
require dirname(__FILE__).'/../lib/openpgp_crypt_rsa.php';
|
require dirname(__FILE__).'/../lib/openpgp_crypt_rsa.php';
|
||||||
|
|
||||||
|
echo OpenPGP::enarmor("test");
|
||||||
|
exit;
|
||||||
|
|
||||||
/* Parse secret key from STDIN, the key must not be password protected */
|
/* Parse secret key from STDIN, the key must not be password protected */
|
||||||
$wkey = OpenPGP_Message::parse(file_get_contents('php://stdin'));
|
$wkey = OpenPGP_Message::parse(file_get_contents('php://stdin'));
|
||||||
$wkey = $wkey[0];
|
$wkey = $wkey[0];
|
||||||
|
@ -29,7 +29,7 @@ class OpenPGP {
|
|||||||
$text .= $key . ': ' . (string)$value . "\n";
|
$text .= $key . ': ' . (string)$value . "\n";
|
||||||
}
|
}
|
||||||
$text .= "\n" . base64_encode($data);
|
$text .= "\n" . base64_encode($data);
|
||||||
$text .= "\n".'=' . substr(pack('N', self::crc24($data)), 1) . "\n";
|
$text .= "\n".'=' . base64_encode(substr(pack('N', self::crc24($data)), 1)) . "\n";
|
||||||
$text .= self::footer($marker) . "\n";
|
$text .= self::footer($marker) . "\n";
|
||||||
return $text;
|
return $text;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user