webogram-i2p/app/js/lib/sha1_worker.js
2014-01-05 20:07:11 +04:00

14 lines
409 B
JavaScript

/*!
* Webogram v0.1 - messaging web application for MTProto
* https://github.com/zhukov/webogram
* Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com>
* https://github.com/zhukov/webogram/blob/master/LICENSE
*/
importScripts('mtproto.js', '../../vendor/cryptoJS/crypto.js');
onmessage = function (e) {
var taskID = e.data.taskID;
postMessage({taskID: taskID, result: sha1Hash(e.data.bytes)});
}