public class ChecksumOperations extends Object
| Constructor and Description |
|---|
ChecksumOperations() |
| Modifier and Type | Method and Description |
|---|---|
String |
calculateChecksum(ChecksumAlgorithm algorithm,
InputStream content)
Calculate the checksum of the stream.
|
void |
validateChecksum(ChecksumAlgorithm algorithm,
InputStream value,
String expected)
Validate the checksum of the stream against an expected checksum.
|
@MediaType(value="text/plain") @Throws(value=ChecksumErrorTypeProvider.class) @Execution(value=CPU_INTENSIVE) public String calculateChecksum(@Optional(defaultValue="SHA_256") ChecksumAlgorithm algorithm, @Content @Optional(defaultValue="#[payload]") InputStream content)
algorithm - the checksum algorithmcontent - the content for calculating the checksum@Validator @Throws(value=ValidationErrorTypeProvider.class) @Execution(value=CPU_INTENSIVE) public void validateChecksum(@Optional(defaultValue="SHA_256") ChecksumAlgorithm algorithm, @Optional(defaultValue="#[payload]") InputStream value, String expected)
algorithm - the checksum algorithmvalue - the content for calculating the checksumexpected - the expected checksum as an hexadecimal stringCopyright © 2024 MuleSoft, Inc.. All rights reserved.