1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2025-09-09 10:19:39 +02:00

Update README

This commit is contained in:
Paul Schaub 2025-05-08 20:58:03 +02:00
parent ab34413fa8
commit 48ba9dbe98
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311

View file

@ -99,7 +99,7 @@ There are some predefined key archetypes, but it is possible to fully customize
.modernKeyRing("Romeo <romeo@montague.lit>", "I defy you, stars!"); .modernKeyRing("Romeo <romeo@montague.lit>", "I defy you, stars!");
// Customized key // Customized key
OpenPGPKey keyRing = PGPainless.buildKeyRing() OpenPGPKey keyRing = api.buildKey()
.setPrimaryKey(KeySpec.getBuilder( .setPrimaryKey(KeySpec.getBuilder(
RSA.withLength(RsaLength._8192), RSA.withLength(RsaLength._8192),
KeyFlag.SIGN_DATA, KeyFlag.CERTIFY_OTHER)) KeyFlag.SIGN_DATA, KeyFlag.CERTIFY_OTHER))
@ -163,7 +163,7 @@ Furthermore, PGPainless will reject signatures made using weak algorithms like S
This behaviour can be modified though using the `Policy` class. This behaviour can be modified though using the `Policy` class.
```java ```java
DecryptionStream decryptionStream = PGPainless.decryptAndOrVerify() DecryptionStream decryptionStream = PGPainless.getInstance().processMessage()
.onInputStream(encryptedInputStream) .onInputStream(encryptedInputStream)
.withOptions(ConsumerOptions.get(api) .withOptions(ConsumerOptions.get(api)
.addDecryptionKey(bobSecKeys, secretKeyProtector) .addDecryptionKey(bobSecKeys, secretKeyProtector)