Interface EncryptionBuilderInterface.ToRecipients

    • Method Detail

      • 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 key
        userId - 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 keys
        userId - 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