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;
|
||||
|
||||
function getHashString(aString) {
|
||||
if (!aString)
|
||||
return '';
|
||||
const hasher = Cc['@mozilla.org/security/hash;1']
|
||||
.createInstance(Ci.nsICryptoHash);
|
||||
hasher.init(Ci.nsICryptoHash.MD5);
|
||||
|
Loading…
Reference in New Issue
Block a user