If it helps, here is the code I currently utilize;
hash: function(str,method) {
var hash_engine = Components.classes[@mozilla.org/security/hash;
1].createInstance().QueryInterface
(Components.interfaces.nsICryptoHash);
switch(method) {
starryrendezv...@gmail.com wrote, On 2009-04-22 07:40:
If it helps, here is the code I currently utilize;
[snip]
I suspect (that is, guess) that your problem is at one of these two places:
1. Perhaps the following code does not pass the UTF8 string you expect it
to pass to the hash algorithm.
starryrendezv...@gmail.com wrote:
hash: function(str,method) {
[...] str.charCodeAt(i)
python quite probably outputs the value of str.charCodeAt(i) as some
variant of a UTF-16 value. Or UCS-2 with no handling of surrogates.
Under which format is the string inside the file that md5sum
Jean-Marc Desperrier wrote, On 2009-04-22 12:17 PDT:
starryrendezv...@gmail.com wrote:
hash: function(str,method) {
[...] str.charCodeAt(i)
python quite probably outputs the value of str.charCodeAt(i) as some
variant of a UTF-16 value. Or UCS-2 with no handling of surrogates.
Under
starryrendezv...@gmail.com wrote:
If it helps, here is the code I currently utilize;
hash: function(str,method) {
var hash_engine = Components.classes[@mozilla.org/security/hash;
1].createInstance().QueryInterface
(Components.interfaces.nsICryptoHash);
var
5 matches
Mail list logo