Interface EncryptedData

All Superinterfaces:
Serializable, org.fuin.objects4j.common.ValueObject

@Immutable public interface EncryptedData extends org.fuin.objects4j.common.ValueObject, Serializable
Container for encrypted data. In addition to the data itself, the container has information about the key used to encrypt the data and the format of the data. The receiving system must have a notion of what the key identifier, versions and data type means. Equals and hash code is based on all data (value object)
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotEmpty String
    Returns the content type like "application/json; encoding=UTF-8; version=1".
    @NotEmpty String
    Returns the unique type of the data like "UserPersonalData".
    @jakarta.validation.constraints.NotEmpty byte[]
    Returns the encrypted data.
    @NotEmpty String
    Returns the unique identifier of the private key used.
    @NotEmpty String
    Returns the version of the private key used.
  • Method Details

    • getKeyId

      @NotEmpty @NotEmpty String getKeyId()
      Returns the unique identifier of the private key used.
      Returns:
      Private key name.
    • getKeyVersion

      @NotEmpty @NotEmpty String getKeyVersion()
      Returns the version of the private key used.
      Returns:
      Version.
    • getDataType

      @NotEmpty @NotEmpty String getDataType()
      Returns the unique type of the data like "UserPersonalData".
      Returns:
      Unique type name.
    • getContentType

      @NotEmpty @NotEmpty String getContentType()
      Returns the content type like "application/json; encoding=UTF-8; version=1".
      Returns:
      Mime type.
    • getEncryptedData

      @NotEmpty @jakarta.validation.constraints.NotEmpty byte[] getEncryptedData()
      Returns the encrypted data.
      Returns:
      Data.