1
0
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:
Robin Munn 2024-02-26 18:36:46 +07:00 committed by GitHub
parent c947ba4310
commit 984863065e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View File

@ -786,6 +786,7 @@ $tw.utils.Crypto = function() {
}
return outputText;
};
$tw.sjcl = sjcl;
this.setPassword = function(newPassword) {
currentPassword = newPassword;
this.updateCryptoStateTiddler();

View File

@ -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));