Suppress error from hash for empty string
This commit is contained in:
parent
d824402f3d
commit
36d7b969aa
@ -41,6 +41,8 @@ const Cc = Components.classes;
|
|||||||
const Ci = Components.interfaces;
|
const Ci = Components.interfaces;
|
||||||
|
|
||||||
function getHashString(aString) {
|
function getHashString(aString) {
|
||||||
|
if (!aString)
|
||||||
|
return '';
|
||||||
const hasher = Cc['@mozilla.org/security/hash;1']
|
const hasher = Cc['@mozilla.org/security/hash;1']
|
||||||
.createInstance(Ci.nsICryptoHash);
|
.createInstance(Ci.nsICryptoHash);
|
||||||
hasher.init(Ci.nsICryptoHash.MD5);
|
hasher.init(Ci.nsICryptoHash.MD5);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user