- 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 TypeMethodDescription@NotEmpty StringReturns the content type like "application/json; encoding=UTF-8; version=1".@NotEmpty StringReturns the unique type of the data like "UserPersonalData".@jakarta.validation.constraints.NotEmpty byte[]Returns the encrypted data.@NotEmpty StringgetKeyId()Returns the unique identifier of the private key used.@NotEmpty StringReturns the version of the private key used.
-
Method Details
-
getKeyId
Returns the unique identifier of the private key used.- Returns:
- Private key name.
-
getKeyVersion
Returns the version of the private key used.- Returns:
- Version.
-
getDataType
Returns the unique type of the data like "UserPersonalData".- Returns:
- Unique type name.
-
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.
-