mirror of
https://github.com/pgpainless/pgpainless.git
synced 2025-09-10 10:49:39 +02:00
SOP : Do not armor already-armored data.
This commit is contained in:
parent
2d6f9738ec
commit
48005da7f3
2 changed files with 18 additions and 2 deletions
|
@ -29,7 +29,9 @@ public class ArmorTest {
|
|||
@Test
|
||||
public void armor() throws PGPException, InvalidAlgorithmParameterException, NoSuchAlgorithmException, IOException {
|
||||
byte[] data = PGPainless.generateKeyRing().modernKeyRing("Alice").getEncoded();
|
||||
byte[] knownGoodArmor = ArmorUtils.toAsciiArmoredString(data).getBytes(StandardCharsets.UTF_8);
|
||||
byte[] knownGoodArmor = ArmorUtils.toAsciiArmoredString(data)
|
||||
.replace("Version: PGPainless\n", "") // armor command does not add version anymore
|
||||
.getBytes(StandardCharsets.UTF_8);
|
||||
byte[] armored = new SOPImpl()
|
||||
.armor()
|
||||
.data(data)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue