|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface DataUnsealer
A DataUnsealer is a thread safe object that can unseal data protected according to the eHealth end-to-end encryption specifications.
A DataUnsealer has a strong association with an reader, because it decrypts data with the private decryption keys of the reader.
Consequently a DataUnsealer must be created for each reader. Use the DataUnsealerBuilder to create DataUnsealers. Once the
DataUnsealer is created, it can be used for several messages. It can be used simultaniously by multiple threads.
To unseal the data, you need
DataUnsealerBuilder,
UnsealedData| Method Summary | |
|---|---|
java.lang.String |
getKekID(byte[] sealedData)
Gets the base 64 encode KEK id in the sealed data. |
CryptoResult<UnsealedData> |
unseal(byte[] data)
Unseals the data using the private keys that were provided to the DataUnsealerFactory when this DataUnsealer was created. |
CryptoResult<UnsealedData> |
unseal(byte[] data,
javax.crypto.SecretKey kek)
Unseals the data using the given Key Encryption Key. |
CryptoResult<UnsealedData> |
unseal(java.io.InputStream sealedData,
java.io.OutputStream unsealedData)
Unseals the data using the private keys that were provided to the DataUnsealerFactory when this DataUnsealer was created. |
CryptoResult<UnsealedData> |
unseal(java.io.InputStream sealedData,
java.io.OutputStream unsealedData,
javax.crypto.SecretKey kek)
Unseals the data using the given Key Encryption Key. |
| Method Detail |
|---|
CryptoResult<UnsealedData> unseal(byte[] data)
data - - the sealed message
CryptoResult<UnsealedData> unseal(byte[] data,
javax.crypto.SecretKey kek)
data - - the sealed messagekek - - the Key Encryption Key by which the data can get decrypted.
CryptoResult<UnsealedData> unseal(java.io.InputStream sealedData,
java.io.OutputStream unsealedData)
sealedData - - the sealed messageunsealedData - - the unsealed data is written to this OutputStream
CryptoResult<UnsealedData> unseal(java.io.InputStream sealedData,
java.io.OutputStream unsealedData,
javax.crypto.SecretKey kek)
sealedData - - the sealed messageunsealedData - - the unsealed data is written to this OutputStreamkek - - the Key Encryption Key by which the data can get decrypted.
java.lang.String getKekID(byte[] sealedData)
sealedData - - the sealed message
java.lang.RuntimeException - if the sealed data is not conform the eHealth ETEE spec (SignedData/EnvelopedData/SignedData, EnvelopedData
with 0 or 1 KEKRecipientInfos).
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||