mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-09-22 09:18:44 +00:00
Fix "sjcl not found" errors in TiddlyDesktop (#8007)
This commit is contained in:
@@ -786,6 +786,7 @@ $tw.utils.Crypto = function() {
|
|||||||
}
|
}
|
||||||
return outputText;
|
return outputText;
|
||||||
};
|
};
|
||||||
|
$tw.sjcl = sjcl;
|
||||||
this.setPassword = function(newPassword) {
|
this.setPassword = function(newPassword) {
|
||||||
currentPassword = newPassword;
|
currentPassword = newPassword;
|
||||||
this.updateCryptoStateTiddler();
|
this.updateCryptoStateTiddler();
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ exports.sha256 = function(source,operator,options) {
|
|||||||
var results = [],
|
var results = [],
|
||||||
length = parseInt(operator.operand,10) || 20,
|
length = parseInt(operator.operand,10) || 20,
|
||||||
sha256 = function(text) {
|
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) {
|
source(function(tiddler,title) {
|
||||||
results.push(sha256(title));
|
results.push(sha256(title));
|
||||||
|
|||||||
Reference in New Issue
Block a user