Use AMD-aware cryptojs from NPM. Update to 0.2.16
This commit is contained in:
parent
073a95b7e6
commit
70d385bc28
1707
3rdparty/bigint.js
vendored
1707
3rdparty/bigint.js
vendored
File diff suppressed because it is too large
Load Diff
22
3rdparty/crypto.js
vendored
22
3rdparty/crypto.js
vendored
@ -1,22 +0,0 @@
|
||||
;(function (root, factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define([
|
||||
"crypto.core",
|
||||
"crypto.enc-base64",
|
||||
"crypto.md5",
|
||||
"crypto.evpkdf",
|
||||
"crypto.cipher-core",
|
||||
"crypto.aes",
|
||||
"crypto.sha1",
|
||||
"crypto.sha256",
|
||||
"crypto.hmac",
|
||||
"crypto.pad-nopadding",
|
||||
"crypto.mode-ctr"
|
||||
], function() {
|
||||
return CryptoJS;
|
||||
}
|
||||
);
|
||||
} else {
|
||||
root.CryptoJS = factory();
|
||||
}
|
||||
}(this));
|
2606
3rdparty/otr.js
vendored
2606
3rdparty/otr.js
vendored
File diff suppressed because it is too large
Load Diff
41
config.js
41
config.js
@ -67,21 +67,23 @@ require.config({
|
||||
"converse-vcard": "src/converse-vcard",
|
||||
|
||||
// Off-the-record-encryption
|
||||
"bigint": "3rdparty/bigint",
|
||||
"crypto": "3rdparty/crypto",
|
||||
"crypto.aes": "node_modules/otr/vendor/cryptojs/aes",
|
||||
"crypto.cipher-core": "node_modules/otr/vendor/cryptojs/cipher-core",
|
||||
"crypto.core": "node_modules/otr/vendor/cryptojs/core",
|
||||
"crypto.enc-base64": "node_modules/otr/vendor/cryptojs/enc-base64",
|
||||
"crypto.evpkdf": "components/crypto-js-evanvosberg/src/evpkdf",
|
||||
"crypto.hmac": "node_modules/otr/vendor/cryptojs/hmac",
|
||||
"crypto.md5": "components/crypto-js-evanvosberg/src/md5",
|
||||
"crypto.mode-ctr": "node_modules/otr/vendor/cryptojs/mode-ctr",
|
||||
"crypto.pad-nopadding": "node_modules/otr/vendor/cryptojs/pad-nopadding",
|
||||
"crypto.sha1": "node_modules/otr/vendor/cryptojs/sha1",
|
||||
"crypto.sha256": "node_modules/otr/vendor/cryptojs/sha256",
|
||||
"bigint": "node_modules/otr/vendor/bigint",
|
||||
"crypto": "node_modules/otr/build/dep/crypto",
|
||||
"aes": "node_modules/crypto-js/aes",
|
||||
"cipher-core": "node_modules/crypto-js/cipher-core",
|
||||
"core": "node_modules/crypto-js/core",
|
||||
"const": "node_modules/otr/lib/const",
|
||||
"helpers": "node_modules/otr/lib/helpers",
|
||||
"sha1": "node_modules/crypto-js/sha1",
|
||||
"hmac": "node_modules/crypto-js/hmac",
|
||||
"enc-base64": "node_modules/crypto-js/enc-base64",
|
||||
"evpkdf": "node_modules/crypto-js/evpkdf",
|
||||
"md5": "node_modules/crypto-js/md5",
|
||||
"mode-ctr": "node_modules/crypto-js/mode-ctr",
|
||||
"pad-nopadding": "node_modules/crypto-js/pad-nopadding",
|
||||
"sha256": "node_modules/crypto-js/sha256",
|
||||
"salsa20": "node_modules/otr/build/dep/salsa20",
|
||||
"otr": "3rdparty/otr",
|
||||
"otr": "node_modules/otr/build/otr",
|
||||
|
||||
// Locales paths
|
||||
"locales": "src/locales",
|
||||
@ -215,17 +217,6 @@ require.config({
|
||||
shim: {
|
||||
'awesomplete': { exports: 'Awesomplete' },
|
||||
'backbone': { deps: ['underscore'] },
|
||||
'bigint': { deps: ['crypto'] },
|
||||
'crypto.aes': { deps: ['crypto.cipher-core'] },
|
||||
'crypto.cipher-core': { deps: ['crypto.enc-base64', 'crypto.evpkdf'] },
|
||||
'crypto.enc-base64': { deps: ['crypto.core'] },
|
||||
'crypto.evpkdf': { deps: ['crypto.md5'] },
|
||||
'crypto.hmac': { deps: ['crypto.core'] },
|
||||
'crypto.md5': { deps: ['crypto.core'] },
|
||||
'crypto.mode-ctr': { deps: ['crypto.cipher-core'] },
|
||||
'crypto.pad-nopadding': { deps: ['crypto.cipher-core'] },
|
||||
'crypto.sha1': { deps: ['crypto.core'] },
|
||||
'crypto.sha256': { deps: ['crypto.core'] },
|
||||
'strophe.ping': { deps: ['strophe'] },
|
||||
'strophe.register': { deps: ['strophe'] },
|
||||
'strophe.vcard': { deps: ['strophe'] },
|
||||
|
@ -830,4 +830,6 @@
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
return converse;
|
||||
}));
|
||||
|
@ -10,9 +10,16 @@
|
||||
* encryption of one-on-one chat messages.
|
||||
*/
|
||||
(function (root, factory) {
|
||||
define(["otr", "converse-core", "tpl!toolbar_otr"], factory);
|
||||
}(this, function (otr, converse, tpl_toolbar_otr) {
|
||||
|
||||
define(["converse-chatview",
|
||||
"tpl!toolbar_otr",
|
||||
'otr',
|
||||
'crypto',
|
||||
'aes'
|
||||
], factory);
|
||||
}(this, function (converse, tpl_toolbar_otr, otr, CryptoJS) {
|
||||
"use strict";
|
||||
|
||||
// Strophe methods for building stanzas
|
||||
var Strophe = converse.env.Strophe,
|
||||
utils = converse.env.utils,
|
||||
|
Loading…
Reference in New Issue
Block a user