1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-16 18:39:54 +00:00
TiddlyWiki5/core/modules/filters/crypto.js
2024-03-08 17:34:30 +00:00

25 lines
515 B
JavaScript

/*\
title: $:/core/modules/filters/crypto.js
type: application/javascript
module-type: filteroperator
Filter operators for cryptography, using the Stanford JavaScript library
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
exports.sha256 = function(source,operator,options) {
var results = [],
length = parseInt(operator.operand,10) || 20;
source(function(tiddler,title) {
results.push($tw.utils.sha256(title,{length: length}));
});
return results;
};
})();