Make using Bouncy Castle with OpenPGP fun again!
BouncyGPG now supports key generation!
// Create a simple RSA KeyPair with 3072 bit keys and with a user-id for Juliet Capulet.
// The KeyPair consists of a single RSA master key which is used for signing, encryption and certification.
final KeyringConfig rsaKeyRing = BouncyGPG.createSimpleKeyring()
.simpleRsaKeyRing(UID_JULIET, RsaLength.RSA_3072_BIT);
SignaturesMissingException
containing the missing signatures.Add support to search for the whole UID instead of e-mail only.
To enable this new feature call "selectUidByAnyUidPart()":
final InputStream plainIS = BouncyGPG.decryptAndVerifyStream()
.withConfig(Configs.keyringConfigFromFilesForRecipient())
.selectUidByAnyUidPart() // << here
.andRequireSignatureFromAllKeys("Sven Sender")
...
API CHANGE: Rfc4880KeySelectionStrategy
no longer enforces to search for e-mail only. If you did not use Rfc4880KeySelectionStrategy
directly this will not affect you unless you enable it by selectUidByAnyUidPart()
. ByEMailKeySelectionStrategy
provides
the old Rfc4880KeySelectionStrategy
behaviour.