Salt Generation
#
Calculating saltSalt is calculated as follows:
- A = Create MD5 hash of
CUSTOMER_ID
- B = Concatenate string of A and
SERVER_HASH
shared by FinBox. - C = Create an SHA-256 hash of B
- Salt = base64 encoded version of C
Sample code for salt generation in different languages:
#
Debugging Salt GenerationYou can cross check each individual step of your salt generation logic by using the following parameters
Step A Result - Hexdigest of MD5Hash
7B85689C14D32209779241F14A09C29B
Step B Result - Intermediate Hash
7B85689C14D32209779241F14A09C29B5f8cd80c69a34b9785dc66298eabe95b
Step C Result - Hexdigest Version
2a2e163b66dbcd838bd6d122e17038e90f2ba5c0b6ca295364c84e19746ca8e4
Note: The result for Step C shared above is generated by doing a hexdigest rather than a digest. It is shared for comparison purposes only. In the actual code you must use digest rather than haxdigest for Step 3.
Final Result - Salt
Ki4WO2bbzYOL1tEi4XA46Q8rpcC2yilTZMhOGXRsqOQ=