We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3a30e42 commit 8dfac4bCopy full SHA for 8dfac4b
1 file changed
tests/suite.php
@@ -437,3 +437,15 @@ public function test000083002sig() {
437
$this->oneIssuer("000083-002.sig", "BD7BA7BC5547FD09");
438
}
439
440
+
441
+class Armor extends TestCase {
442
+ public function testRoundTrip() {
443
+ $bytes = "abcd\0\xff";
444
+ $this->assertEquals($bytes, OpenPGP::unarmor(OpenPGP::enarmor($bytes), 'MESSAGE'));
445
+ }
446
447
+ public function testInvalidBase64() {
448
+ $input = OpenPGP::header('MESSAGE') . "\n\nY~WJjZAD/\n=PE3Q\n" . OpenPGP::footer('MESSAGE');
449
+ $this->assertEquals(false, OpenPGP::unarmor($input, 'MESSAGE'));
450
451
+}
0 commit comments