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 c
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.
>
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
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.
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) {
I got a bug filed for my extension, since I am using the native hash
functionalities right from the XPCOM (@mozilla.org/security/hash;1)
without any code from me between it, I wonder how to solve this:
md5 hash a UTF-8 encoded string:
"您好"(it means "hello" in Chinese), it yields a different resul
6 matches
Mail list logo