Class AesEncryptedPayload

java.lang.Object
de.otto.kafka.messaging.e2ee.AesEncryptedPayload

public class AesEncryptedPayload extends Object
  • Constructor Details

    • AesEncryptedPayload

      public AesEncryptedPayload(byte[] plainPayload)
    • AesEncryptedPayload

      public AesEncryptedPayload(byte[] encryptedPayload, byte[] initializationVector, int keyVersion)
    • AesEncryptedPayload

      public AesEncryptedPayload(byte[] encryptedPayload, byte[] initializationVector, int keyVersion, String encryptionKeyAttributeName)
    • AesEncryptedPayload

      public AesEncryptedPayload(byte[] encryptedPayload, String initializationVectorBase64, int keyVersion)
    • AesEncryptedPayload

      public AesEncryptedPayload(byte[] encryptedPayload, String initializationVectorBase64, int keyVersion, String encryptionKeyAttributeName)
  • Method Details

    • ofUnencryptedPayload

      public static AesEncryptedPayload ofUnencryptedPayload(byte[] plainPayload)
    • ofEncryptedPayload

      public static AesEncryptedPayload ofEncryptedPayload(byte[] encryptedPayload, byte[] initializationVector, EncryptionKeyProvider.KeyVersion keyVersion)
    • ofEncryptedPayload

      public static AesEncryptedPayload ofEncryptedPayload(byte[] encryptedPayload, String initializationVectorBase64, int keyVersion)
    • ofEncryptedPayload

      public static AesEncryptedPayload ofEncryptedPayload(byte[] encryptedPayload, String initializationVectorBase64, int keyVersion, String encryptionKeyAttributeName)
    • ofEncryptedPayload

      public static AesEncryptedPayload ofEncryptedPayload(byte[] encryptedPayload, byte[] initializationVector, EncryptionCipherSpec cipherSpec)
    • ofEncryptedPayload

      public static AesEncryptedPayload ofEncryptedPayload(byte[] encryptedPayload, String initializationVectorBase64, EncryptionCipherSpec cipherSpec)
    • isEncrypted

      public boolean isEncrypted()
    • encryptedPayload

      public byte[] encryptedPayload()
    • initializationVector

      public byte[] initializationVector()
    • initializationVectorBase64

      public String initializationVectorBase64()
    • keyVersion

      public int keyVersion()
    • encryptionKeyAttributeName

      public String encryptionKeyAttributeName()
      Returns:
      name of the encryption key property within the vault. When null, then the default value must be used.
    • toString

      public String toString()
      Overrides:
      toString in class Object