Files
DefinitelyTyped/types/crypto-js
Ritorna 2d7c61c83d Added WordArray to Hash type Definition
Added the WordArray type to the Hash type.

var kDate = Crypto.HmacSHA256(dateStamp, "AWS4" + key);
    var kRegion = Crypto.HmacSHA256(regionName, kDate); <=== Issue because kDate is typeof WordArray and not string as the key should be supposed to. 
With adding the WordArray type the Hashing Procedure works fine (when using the toString it doesn't work correctly there).

Sample for JS from Amazon:
https://docs.aws.amazon.com/de_de/general/latest/gr/signature-v4-examples.html#signature-v4-examples-javascript
2017-12-07 17:03:09 +01:00
..