public class JceOperations extends Object
| Constructor and Description |
|---|
JceOperations() |
| Modifier and Type | Method and Description |
|---|---|
InputStream |
jceDecrypt(JceConfiguration config,
InputStream content,
JceEncryptionKeyAlgorithmSelection algorithmSelection,
JceKeySelection keySelection)
Decrypt a stream using JCE, with a key.
|
InputStream |
jceDecryptPbe(InputStream content,
JceEncryptionPbeAlgorithm algorithm,
String password)
Decrypt a stream using JCE, with a password.
|
InputStream |
jceEncrypt(JceConfiguration config,
InputStream content,
JceEncryptionKeyAlgorithmSelection algorithmSelection,
JceKeySelection keySelection)
Encrypt a stream using JCE, with a key.
|
InputStream |
jceEncryptPbe(InputStream content,
JceEncryptionPbeAlgorithm algorithm,
String password)
Encrypt a stream using JCE, with a password.
|
String |
jceSign(JceConfiguration config,
InputStream content,
JceSignatureKeyAlgorithm algorithm,
JceKeySelection keySelection)
Sign a stream using JCE, with a key.
|
String |
jceSignPbe(InputStream content,
JceSignaturePbeAlgorithm algorithm,
String password)
Sign a stream using JCE, with a key.
|
void |
jceValidate(JceConfiguration config,
InputStream value,
String expected,
JceSignatureKeyAlgorithm algorithm,
JceKeySelection keySelection)
Validate a stream against a signature, using a key.
|
void |
jceValidatePbe(InputStream value,
String expected,
JceSignaturePbeAlgorithm algorithm,
String password)
Validate a stream against a signature, using a key.
|
@MediaType(value="application/octet-stream",
strict=false)
@Throws(value={EncryptionErrorTypeProvider.class,ParametersErrorTypeProvider.class})
@Execution(value=CPU_INTENSIVE)
public InputStream jceEncrypt(@Config
JceConfiguration config,
@Content
InputStream content,
@ParameterGroup(name="Algorithm selection")
JceEncryptionKeyAlgorithmSelection algorithmSelection,
@ParameterGroup(name="Key selection")
JceKeySelection keySelection)
config - the JCE configurationcontent - the content to encryptalgorithmSelection - the algorithm, either from a predefined enumeration or custom cipher stringkeySelection - the key used to encrypt@MediaType(value="application/octet-stream",
strict=false)
@Throws(value={DecryptionErrorTypeProvider.class,ParametersErrorTypeProvider.class})
@Execution(value=CPU_INTENSIVE)
public InputStream jceDecrypt(@Config
JceConfiguration config,
@Content
InputStream content,
@ParameterGroup(name="Algorithm selection")
JceEncryptionKeyAlgorithmSelection algorithmSelection,
@ParameterGroup(name="Key selection")
JceKeySelection keySelection)
config - the JCE configurationcontent - the content to decryptalgorithmSelection - the algorithm, either from a predefined enumeration or custom cipher stringkeySelection - the key used to decrypt@MediaType(value="text/plain",
strict=false)
@Throws(value=SignatureErrorTypeProvider.class)
@Execution(value=CPU_INTENSIVE)
public String jceSign(@Config
JceConfiguration config,
@Content
InputStream content,
@Optional(defaultValue="HmacSHA256")
JceSignatureKeyAlgorithm algorithm,
@ParameterGroup(name="Key selection")
JceKeySelection keySelection)
config - the JCE configurationcontent - the content to signalgorithm - the algorithm used for signingkeySelection - the key used to sign@Validator @Throws(value=ValidationErrorTypeProvider.class) @Execution(value=CPU_INTENSIVE) public void jceValidate(@Config JceConfiguration config, @Optional(defaultValue="#[payload]") InputStream value, String expected, @Optional(defaultValue="HmacSHA256") JceSignatureKeyAlgorithm algorithm, @ParameterGroup(name="Key selection") JceKeySelection keySelection)
config - the JCE configurationvalue - the message to authenticateexpected - the signature to validatealgorithm - the algorithm used for signingkeySelection - the key used for signing@MediaType(value="application/octet-stream",
strict=false)
@Throws(value={EncryptionErrorTypeProvider.class,ParametersErrorTypeProvider.class})
@Execution(value=CPU_INTENSIVE)
public InputStream jceEncryptPbe(@Content
InputStream content,
@Optional(defaultValue="PBEWithHmacSHA256AndAES_128")
JceEncryptionPbeAlgorithm algorithm,
@Password
String password)
content - the content to encryptalgorithm - the algorithm for generating a key from the passwordpassword - the password for encryption@MediaType(value="application/octet-stream",
strict=false)
@Throws(value={DecryptionErrorTypeProvider.class,ParametersErrorTypeProvider.class})
@Execution(value=CPU_INTENSIVE)
public InputStream jceDecryptPbe(@Content
InputStream content,
@Optional(defaultValue="PBEWithHmacSHA256AndAES_128")
JceEncryptionPbeAlgorithm algorithm,
@Password
String password)
content - the content to decryptalgorithm - the algorithm for generating a key from the passwordpassword - the password for decryption@MediaType(value="text/plain",
strict=false)
@Throws(value=SignatureErrorTypeProvider.class)
@Execution(value=CPU_INTENSIVE)
public String jceSignPbe(@Content
InputStream content,
@Optional(defaultValue="PBEWithHmacSHA256")
JceSignaturePbeAlgorithm algorithm,
@Password
String password)
content - the content to signalgorithm - the algorithm used for signingpassword - the password used to sign@Validator @Throws(value=ValidationErrorTypeProvider.class) @Execution(value=CPU_INTENSIVE) public void jceValidatePbe(@Optional(defaultValue="#[payload]") InputStream value, String expected, @Optional(defaultValue="PBEWithHmacSHA256") JceSignaturePbeAlgorithm algorithm, @Password String password)
value - the message to authenticateexpected - the signature to validatealgorithm - the algorithm used for signingpassword - the password used to signCopyright © 2024 MuleSoft, Inc.. All rights reserved.