Class AbstractEncryptedKeyResolver

    • Field Detail

      • recipients

        private final Collection<String> recipients
        Recipient attribute criteria against which to match.
    • Constructor Detail

      • AbstractEncryptedKeyResolver

        public AbstractEncryptedKeyResolver()
        Constructor.
      • AbstractEncryptedKeyResolver

        public AbstractEncryptedKeyResolver​(@Nullable
                                            Set<String> newRecipents)
        Constructor.
        Parameters:
        newRecipents - set of recipients
      • AbstractEncryptedKeyResolver

        public AbstractEncryptedKeyResolver​(@Nullable
                                            String recipient)
        Constructor.
        Parameters:
        recipient - the recipient
    • Method Detail

      • matchRecipient

        protected boolean matchRecipient​(@Nullable
                                         String recipient)
        Evaluate whether the specified recipient attribute value matches this resolver's recipient criteria.
        Parameters:
        recipient - the recipient value to evaluate
        Returns:
        true if the recipient value matches the resolver's criteria, false otherwise
      • matchCarriedKeyName

        protected boolean matchCarriedKeyName​(@Nonnull
                                              EncryptedData encryptedData,
                                              @Nonnull
                                              EncryptedKey encryptedKey)
        Evaluate whether an EncryptedKey's CarriedKeyName matches one of the KeyName values from the EncryptedData context.
        Parameters:
        encryptedData - the EncryptedData context
        encryptedKey - the candidate Encryptedkey to evaluate
        Returns:
        true if the encrypted key's carried key name matches that of the encrytped data, false otherwise
      • matchDataReference

        protected boolean matchDataReference​(@Nonnull
                                             EncryptedData encryptedData,
                                             @Nonnull
                                             EncryptedKey encryptedKey)
        Evaluate whether any of the EncryptedKey's DataReferences refer to the EncryptedData context.
        Parameters:
        encryptedData - the EncryptedData context
        encryptedKey - the candidate Encryptedkey to evaluate
        Returns:
        true if any of the encrypted key's data references refer to the encrypted data context, false otherwise