B2B Integration 10.2 | Administering and Monitoring B2B Transactions | Trading Networks Built-In Services Reference | Mime Folder | Summary of Elements in this Folder | wm.tn.mime:setDigestAlgorithm
 
wm.tn.mime:setDigestAlgorithm
Sets the digest algorithm that you want the wm.tn.mime:writeToStream service to use to compute a message digest for the specified MIME object when it writes the MIME object to a stream.
Input Parameters
mimeData
Object The MIME object for which you want to compute a digest.
digestAlgorithm
String (optional) The algorithm to use to compute the digest. You can specify one of the following values for digestAlgorithm: SHA-1 or MD5.SHA-1 is the default.
digestHeader
String (optional) Whether to include the MIME headers when computing the message digest. Valid values are:
*yes- Default. Include the headers when computing the message digest.
*no - Do not include the headers when computing the message digest.
digestAllHeaders
String (optional) Whether to include all headers when computing the message digest or only those specified by the headersToDigest input parameter. This parameter is used when you specify yes for the digestHeader input parameter. Valid values are:
*yes - Include all headers when computing the message digest. When you specify yes, this service ignores the headersToDigest input parameter.
This service includes all headers for this MIME message when computing the message digest. The digest is computed based on the headers in the message at the time this service was invoked. If additional headers are added after you invoke this service, those headers will not be included in the final message digest.
*no - Default. Include only those headers specified by the headersToDigest input parameter when computing the message digest.
headersToDigest
String [ ] (optional) The headers to include in the message digest if digestHeader is yes. The default is { "Content-Type", "Content-Transfer-Encoding", "Content-Disposition" }.
The value that you specify for headersToDigest is not case sensitive. However, the order you specify the headers must match the order they appear in the message.
If no headers are specified (headersToDigest is empty), no headers will be digested.
Output Parameters
None.
Usage Notes
*Invoking this service on a MIME object indicates that you want the contents of this object to be digested when written to a stream using the wm.tn.mime:writeToStream service. To retrieve the message digest invoke the wm.tn.mime:getDigest service after calling wm.tn.mime:writeToStream. Do not alter the MIME object after invoking the wm.tn.mime:setDigestAlgorithm service because it will cause wm.tn.mime:writeToStream service to compute the message digest incorrectly.
*Use this service when sending a message that you created. For more information, see Using the MIME Services to Send MIME Messages You Create.
*This service is not compatible with those in the pub.mime folder. The MIME objects that the pub.mime:createMimeData service creates will not work with this service.

Copyright © 2016- 2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.