Answer the question
In order to leave comments, you need to log in
Is there a CryptJS Wordarray equivalent in Python?
In general, all crypto calculations and hashes through CryptJS and Python are the same (tested on people :).
Except in one case, hashing a string:
parse: function (hexStr) {
// Shortcut
var hexStrLength = hexStr.length;
// Convert
var words = [];
for (var i = 0; i < hexStrLength; i += 2) {
words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << (24 - (i % 8) * 4);
}
return new WordArray.init(words, hexStrLength / 2);
}
869d4578474812f1fd5026755c691ddbf48c6bfd84292235ddbe6e78c748ec4c307d51dd341899cf7e15.......
{'sigBytes': 256, 'words': [-1846127087, -525984258, 1421638880, 693604242, -431093699, -1835349658, -802431828, 512627615, 1875065943, -247975330, 958956649, -1884646837, -801131195 ...........
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question