mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-30 05:19:57 +00:00
Fix "sjcl not found" errors in TiddlyDesktop (#8007)
This commit is contained in:
parent
c947ba4310
commit
984863065e
@ -786,6 +786,7 @@ $tw.utils.Crypto = function() {
|
||||
}
|
||||
return outputText;
|
||||
};
|
||||
$tw.sjcl = sjcl;
|
||||
this.setPassword = function(newPassword) {
|
||||
currentPassword = newPassword;
|
||||
this.updateCryptoStateTiddler();
|
||||
|
@ -16,7 +16,7 @@ exports.sha256 = function(source,operator,options) {
|
||||
var results = [],
|
||||
length = parseInt(operator.operand,10) || 20,
|
||||
sha256 = function(text) {
|
||||
return sjcl.codec.hex.fromBits(sjcl.hash.sha256.hash(text)).substr(0,length);
|
||||
return $tw.sjcl.codec.hex.fromBits($tw.sjcl.hash.sha256.hash(text)).substr(0,length);
|
||||
};
|
||||
source(function(tiddler,title) {
|
||||
results.push(sha256(title));
|
||||
|
Loading…
Reference in New Issue
Block a user