@Immutable
public final class EncryptedData
extends java.lang.Object
implements org.fuin.objects4j.vo.ValueObject, java.io.Serializable
| Modifier and Type | Class and Description |
|---|---|
static interface |
EncryptedData.Decrypter
Decrypts some data.
|
static interface |
EncryptedData.Encrypter
Encrypts some data.
|
| Modifier | Constructor and Description |
|---|---|
protected |
EncryptedData()
Default constructor for deserialization (JAX-B/JSON-B).
|
|
EncryptedData(@NotEmpty java.lang.String keyId,
@NotEmpty java.lang.String keyVersion,
java.lang.String ivVersion,
@NotEmpty java.lang.String dataType,
@NotEmpty java.lang.String contentType,
@NotEmpty byte[] encryptedData)
Constructor with all mandatory data.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
@NotEmpty java.lang.String |
getContentType()
Returns the content type like "application/json; encoding=UTF-8; version=1".
|
@NotEmpty java.lang.String |
getDataType()
Returns the unique type of the data like "UserPersonalData".
|
@NotEmpty byte[] |
getEncryptedData()
Returns the encrypted data.
|
java.lang.String |
getIvVersion()
Returns the optional version of the initialization vector.
|
@NotEmpty java.lang.String |
getKeyId()
Returns the unique identifier of the private key used.
|
@NotEmpty java.lang.String |
getKeyVersion()
Returns the version of the private key used.
|
int |
hashCode() |
java.lang.String |
toString() |
protected EncryptedData()
public EncryptedData(@NotEmpty
@NotEmpty java.lang.String keyId,
@NotEmpty
@NotEmpty java.lang.String keyVersion,
@Nullable
java.lang.String ivVersion,
@NotEmpty
@NotEmpty java.lang.String dataType,
@NotEmpty
@NotEmpty java.lang.String contentType,
@NotEmpty
@NotEmpty byte[] encryptedData)
keyId - Unique identifier of the private key used.keyVersion - Version of the private key used.ivVersion - Version of the initialization vector (optional).dataType - Unique type of the data like "UserPersonalData" or even a fully qualified class name.contentType - Content/Mime type like "application/json; encoding=UTF-8; version=1".encryptedData - Encrypted data.@NotEmpty public final @NotEmpty java.lang.String getKeyId()
@NotEmpty public final @NotEmpty java.lang.String getKeyVersion()
@Nullable public final java.lang.String getIvVersion()
@NotEmpty public final @NotEmpty java.lang.String getDataType()
@NotEmpty public final @NotEmpty java.lang.String getContentType()
@NotEmpty public final @NotEmpty byte[] getEncryptedData()
public final int hashCode()
hashCode in class java.lang.Objectpublic final boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic final java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2019 fuin.org (Germany). All Rights Reserved.