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