Class FieldLevelEncryptionService

java.lang.Object
de.otto.kafka.messaging.e2ee.fieldlevel.FieldLevelEncryptionService

public final class FieldLevelEncryptionService extends Object
  • Constructor Details

    • FieldLevelEncryptionService

      public FieldLevelEncryptionService(EncryptionService encryptionService)
    • FieldLevelEncryptionService

      public FieldLevelEncryptionService(EncryptionKeyProvider encryptionKeyProvider)
  • Method Details

    • encryptFieldValueToString

      public String encryptFieldValueToString(String kafkaTopicName, String plainText)
      encrypts the given text (depending on the topic related configuration).
      Parameters:
      kafkaTopicName - name of the Kafka Topic the field value is for.
      plainText - the plain text value. Can be null.
      Returns:
      The encrypted string or null
    • encryptFieldValueToEncryptedString

      public EncryptedString encryptFieldValueToEncryptedString(String kafkaTopicName, String plainText)
      encrypts the given text (depending on the topic related configuration).
      Parameters:
      kafkaTopicName - name of the Kafka Topic the field value is for.
      plainText - the plain text value. Can be null.
      Returns:
      The encrypted string or null