Interface EncryptionBuilderInterface.ToRecipients
-
- All Known Subinterfaces:
EncryptionBuilderInterface.ToRecipientsOrNoEncryption
,EncryptionBuilderInterface.ToRecipientsOrSign
- Enclosing interface:
- EncryptionBuilderInterface
public static interface EncryptionBuilderInterface.ToRecipients
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description EncryptionBuilderInterface.AdditionalRecipients
forPassphrase(Passphrase passphrase)
Symmetrically encrypt the message using a passphrase.EncryptionBuilderInterface.AdditionalRecipients
toRecipient(org.bouncycastle.openpgp.PGPPublicKeyRing key)
Encrypt for the given valid public key.EncryptionBuilderInterface.AdditionalRecipients
toRecipient(org.bouncycastle.openpgp.PGPPublicKeyRingCollection keys, java.lang.String userId)
Encrypt for the first valid key in the provided keys collection which has a valid user-id that matches the provided userId.EncryptionBuilderInterface.AdditionalRecipients
toRecipient(org.bouncycastle.openpgp.PGPPublicKeyRing key, java.lang.String userId)
Encrypt for the given valid key using the provided user-id signature to determine preferences.EncryptionBuilderInterface.AdditionalRecipients
toRecipients(org.bouncycastle.openpgp.PGPPublicKeyRingCollection keys)
Encrypt for all valid public keys in the provided collection.
-
-
-
Method Detail
-
toRecipient
EncryptionBuilderInterface.AdditionalRecipients toRecipient(@Nonnull org.bouncycastle.openpgp.PGPPublicKeyRing key)
Encrypt for the given valid public key. TODO: Explain the difference between this andtoRecipient(PGPPublicKeyRing, String)
.- Parameters:
key
- recipient key for which the message will be encrypted.- Returns:
- api handle
-
toRecipient
EncryptionBuilderInterface.AdditionalRecipients toRecipient(@Nonnull org.bouncycastle.openpgp.PGPPublicKeyRing key, @Nonnull java.lang.String userId)
Encrypt for the given valid key using the provided user-id signature to determine preferences.- Parameters:
key
- public keyuserId
- user-id which is used to select the correct encryption parameters based on preferences.- Returns:
- api handle
-
toRecipient
EncryptionBuilderInterface.AdditionalRecipients toRecipient(@Nonnull org.bouncycastle.openpgp.PGPPublicKeyRingCollection keys, @Nonnull java.lang.String userId)
Encrypt for the first valid key in the provided keys collection which has a valid user-id that matches the provided userId. The user-id is also used to determine encryption preferences.- Parameters:
keys
- collection of keysuserId
- user-id used to select the correct key- Returns:
- api handle
-
toRecipients
EncryptionBuilderInterface.AdditionalRecipients toRecipients(@Nonnull org.bouncycastle.openpgp.PGPPublicKeyRingCollection keys)
Encrypt for all valid public keys in the provided collection. If any key is not eligible for encryption (e.g. expired, revoked...), an exception will be thrown. TODO: which exception?- Parameters:
keys
- collection of public keys- Returns:
- api handle
-
forPassphrase
EncryptionBuilderInterface.AdditionalRecipients forPassphrase(Passphrase passphrase)
Symmetrically encrypt the message using a passphrase. Note that the passphrase MUST NOT be empty.- Parameters:
passphrase
- passphrase- Returns:
- api handle
-
-