SignatureCalculator usage and MAC

I have an example request as follows:

`

POST http://stage-xxx.zzz.com/zzzxxxApi/ProvisioningService.asmx?wsdl HTTP/1.1
Content-Type: application/soap+xml; charset=utf-8; action=“http://xxx.xxx.xxx.com/UpdateMerchant2
Host: stage-xxx.xxx.com
Content-Length: 1270
Expect: 100-continue
Accept-Encoding: gzip, deflate
Connection: Keep-Alive

<s:Envelope xmlns:s=“http://www.w3.org/2003/05/soap-envelope”><s:Body><ns0:UpdateMerchant2 xmlns:ns0=“http://xxx.xxx.xxx.com/” xmlns:ns1=“http://xxx.xxx.xxx.No/”>ns0:wrapperns0:Headerns1:AcquirerIdxxx</ns1:AcquirerId>ns1:AgreementIDxxx</ns1:AgreementID>ns1:CashRegisterID0000000xxx5451</ns1:CashRegisterID>ns1:MerchantConceptIDx4x0</ns1:MerchantConceptID>ns1:MerchantIDxxx</ns1:MerchantID></ns0:Header>ns0:UpdateMerchantRequestns0:GLNxxx</ns0:GLN>ns0:ExternalMerchantRef5410</ns0:ExternalMerchantRef>ns0:ExternalMerchantNamexxx xxx</ns0:ExternalMerchantName>ns0:ExternalStoreIdxxx</ns0:ExternalStoreId>ns0:MerchantStatus1</ns0:MerchantStatus>ns0:PxProduct8</ns0:PxProduct>ns0:PxProductStatus1</ns0:PxProductStatus>ns0:PxProductValidFrom0000.00.00</ns0:PxProductValidFrom>ns0:PxProductValidTo0000.00.00</ns0:PxProductValidTo>ns0:ChangedByUserxxx</ns0:ChangedByUser>ns0:Addressxx 62</ns0:Address>ns0:Cityxx</ns0:City>ns0:Countryxx</ns0:Country>ns0:PostalCode0xxx</ns0:PostalCode></ns0:UpdateMerchantRequest>ns0:Footerns1:MACboGn+7MFlu1nqJ</ns1:MAC></ns0:Footer></ns0:wrapper></ns0:UpdateMerchant2></s:Body></s:Envelope>

`

My challenge is that I need to calculate the value of ns1:MAC based on the following documentation:

`

MAC implementation:

Create a UTF8 encoded SHA1 hash of the following string. Return the first half.



If a field does not contain content, do not send the content (null / “ “ / ) in MAC. AgreementID+MerchantConceptID+MerchantID +TransmissionTime+AcquirerId+



+ValueCodeID+ValueCodeType +MAC Key

`

For testing purposes I only want to use different ‘ValuecodeID’ for each request.

How is this done using Gatling? and is signature calculator the way to go here?

Also what is the sequence in the generating/calculating og the MAC using the signature calculator. Do I calculate ‘in session’?

Thanks!