Message Integrity
Use hashing to ensure message integrity
Use hashing to ensure message integrity
Recommendations
Explore
Mirth® Connect by NextGen Healthcare User Guide
Use hashing to ensure message integrity
A SHA-256 hash is automatically generated for each outgoing message from a destination connector. See the Message Hash variable on Destination Mappings. Using that variable, the hash value can be sent to the destination alongside the message content. The recipient can use the hash to validate that the message hasn't been altered. An example use case is to include the hash value in a header using an HTTP Sender. To validate the integrity of incoming messages, you can use JavaScript code in a Source Filter. For example, using an HTTP Receiver and assuming the hash value is being sent in a header named hash, you can use the following code in a JavaScript Filter step: Validate Message Hash // Get the received hash from the request header var receivedHash = sourceMap.get('headers').getHeader('hash'); // Generate a hash from the received message content var generatedHash = HashUtil.generate(connectorMessage.getRawData(), 'UTF-8', 'SHA-256'); // Accept the message only if the hashes match ret
Mirth® Connect by NextGen Healthcare User Guide
Channel Configuration
Use tags to categorize your channels Place any reusable JavaScript code into Code Template functions and organize them into Code Template Libraries. Use Custom Meta Data Columns to increase the performance of searching the message history on a particular message field. Use Deploy/Start Dependencies if one channel depends on another to operate correctly. Use multiple resource folders for your Java libraries if you need to limit library usage to specific channels or if you have many Java libraries. Use tags to categorize your channels Place any reusable JavaScript code into Code Template functions and organize them into Code Template Libraries. Use Custom Meta Data Columns to increase the performance of searching the message history on a particular message field. Use Deploy/Start Dependencies if one channel depends on another to operate correctly. Use multiple resource folders for your Java libraries if you need to limit library usage to specific channels or if you have many Java librari
Mirth® Connect by NextGen Healthcare User Guide
Channel Performance
Adjust the Message Storage slider so that the channel only retains the message data that you will actually need. If large messages are expected, use an Attachment Handler to improve throughput and reduce memory and disk usage. Enable source queuing if an auto-generated acknowledgement is sufficient for the upstream system. Enable destination queuing if you do not need to respond to the originating system from your destination. Increase the Max Processing Threads value if message order is not important and you may receive a large number of messages in a short time Increase the Queue Threads value if the downstream system can accept multiple concurrent connections. Clear the "Wait for previous destination" checkbox, unless you need destinations to process messages one after another. Use the "Destination Set Filter" feature in your source transformer when you need to route messages to only one (or a subset) of destinations in your channel. Adjust the Message Storage slider so that the cha
Mirth® Connect by NextGen Healthcare User Guide
Other Tips
Do not reference Mirth Connect internal Java classes in your JavaScript code. Do not reference Mirth Connect internal Java classes in your JavaScript code. Parent topic: Channel Development Best Practices and Tips
Mirth® Connect by NextGen Healthcare User Guide
Channel Development Best Practices and Tips
Channel Performance Channel Configuration Other Tips Channel Performance Channel Configuration Message Integrity Other Tips
Mirth® Connect by NextGen Healthcare User Guide
§170.315(d)(8) Integrity
(d)(8) Integrity requires that a message digest can be created and sent using a hashing algorithm of SHA-2 security strength or greater. Required Extensions None Features that Support the Certification A SHA-256 hash variable (named Message Hash) is automatically generated for each message sent out by a destination connector. If sending the hash, the recipient of the message and the hash can validate the content of the message. For additional information, see Destination Mappings. New utility functions have been added to create a message hash, supporting the filtering of messages either in a source or destination connector. They are: HashUtil.generate(object); HashUtil.generate(string, encoding, algorithm); HashUtil.generate(byte[], algorithm); Required Actions Use of the Message Hash variable. Use the hash HashUtil.generate functions to compare received with generated hash. See examples in the Message Integrity section of Channel Development Best Practices and Tips. Parent topic: Cure