Fix/sjcl variable (#8099)

* refactor: use files to add prefix

* fix: always use $tw.sjcl

* refactor: move sjcl to lib/sjcl

* fix: require sjcl in lib/

* refactor: move sjcl.js back into /boot
This commit is contained in:
lin onetwo
2024-05-26 15:56:25 +01:00
committed by GitHub
parent e3f9be995b
commit a463783283
3 changed files with 36 additions and 4 deletions
+1 -1
View File
@@ -825,7 +825,7 @@ options.length .. number of characters returned defaults to 64
*/
exports.sha256 = function(str, options) {
options = options || {}
return sjcl.codec.hex.fromBits(sjcl.hash.sha256.hash(str)).substr(0,options.length || 64);
return $tw.sjcl.codec.hex.fromBits($tw.sjcl.hash.sha256.hash(str)).substr(0,options.length || 64);
}
/*