Asked
            
        
        
            Active
            
        
            Viewed 434 times
        
    3
            
            
        - 
                    Do you need to base64 stringify it after using HMAC-SHA512? – Danny Dainton Jan 07 '18 at 10:13
 - 
                    Is it saving the environment variable as you expect it too? – Danny Dainton Jan 07 '18 at 10:26
 - 
                    Hey Danny, without base64 stringify, it represents itself as [Object Object] in http headers. Environment Variable is translating as expected. – Sai Jan 07 '18 at 17:15
 
1 Answers
4
            
            
        Instead of
var hashInBase64 = CryptoJS.enc.Base64.stringify(hash);
pm.environment.set("hmacd", hashInBase64);
You should use
var hashInHex = CryptoJS.enc.Hex.stringify(hash);
pm.environment.set("hmacd", hashInHex);
As Poloniex uses Hex encoding instead of Base64 encoding for the signature.
        KarsonOdette
        
- 66
 - 4
 


