Is there a way to convert a hash to a word array in Python as in JS?
In JS with CryptoJS I can use: CryptoJS.enc.Hex.parse(hash) which will output the word array.
I've tried googling it but cannot seem to find how to do that in Python.
Javascript example:
var CryptoJS = require("crypto-js");
var hash = "c8f3ab9777da89748851932d3446b197450bb12fa9b9136ad708734291a6c60c";
console.log(hash);
I cannot figure out how to get similar output with hmac and hashlib libraries in Python but I expect the output something like this:
{ words:
[ -923554921,
2010810740,
-2007919827,
877048215,
1158394159,
-1447488662,
-687312062,
-1851341300 ],
sigBytes: 32 }
Update: I need to have an output in the exact same format (spacing, indents, new lines) to produce a subsequent hash from the output.