public class CMSEncryptionServiceImpl extends Object implements CMSEncryptionService
| Constructor and Description |
|---|
CMSEncryptionServiceImpl(CMSEncryptionConfig encryptionConfig) |
| Modifier and Type | Method and Description |
|---|---|
InputStream |
buildDecryptionInputStream(InputStream inputStream,
Function<String,Key> keyById)
Decryption stream using
CMSEnvelopedDataParser, supported recipients ids are:
- RecipientId.keyTrans for asymmetric encryption
- RecipientId.kek for symmetric encryption |
OutputStream |
buildEncryptionOutputStream(OutputStream dataContentStream,
PublicKey publicKey,
KeyID publicKeyID)
Asymmetrical encryption-based stream, algorithm is provided by
CMSEncryptionConfig.getAlgorithm()
Uses RecipientId.keyTrans recipient id. |
OutputStream |
buildEncryptionOutputStream(OutputStream dataContentStream,
SecretKey secretKey,
KeyID keyID)
Symmetrical encryption-based stream, algorithm is provided by
CMSEncryptionConfig.getAlgorithm()
Uses RecipientId.kek recipient id. |
@Inject public CMSEncryptionServiceImpl(CMSEncryptionConfig encryptionConfig)
public OutputStream buildEncryptionOutputStream(OutputStream dataContentStream, PublicKey publicKey, KeyID publicKeyID)
CMSEncryptionConfig.getAlgorithm()
Uses RecipientId.keyTrans recipient id.buildEncryptionOutputStream in interface CMSEncryptionServicepublic OutputStream buildEncryptionOutputStream(OutputStream dataContentStream, SecretKey secretKey, KeyID keyID)
CMSEncryptionConfig.getAlgorithm()
Uses RecipientId.kek recipient id.buildEncryptionOutputStream in interface CMSEncryptionServicepublic InputStream buildDecryptionInputStream(InputStream inputStream, Function<String,Key> keyById)
CMSEnvelopedDataParser, supported recipients ids are:
- RecipientId.keyTrans for asymmetric encryption
- RecipientId.kek for symmetric encryptionbuildDecryptionInputStream in interface CMSEncryptionServiceCopyright © 2019. All rights reserved.