Log in to the merchant interface, and then:
- Select the «Configuration» item from the top menu.
- Select the «Technical information» item from the top submenu.
- Select the «Global security parameters» item from the 3-rd level submenu.
You can choose any value of the «Hash algorithm» option, but it should be the same here and in your Magento 2 backend.
The value affects the algorithms of the SHA-IN and SHA-OUT signatures calculation.