summaryrefslogtreecommitdiff
path: root/www/lib/crypto-js/mode-ofb.js
diff options
context:
space:
mode:
Diffstat (limited to 'www/lib/crypto-js/mode-ofb.js')
-rw-r--r--www/lib/crypto-js/mode-ofb.js54
1 files changed, 0 insertions, 54 deletions
diff --git a/www/lib/crypto-js/mode-ofb.js b/www/lib/crypto-js/mode-ofb.js
deleted file mode 100644
index c01314c2..00000000
--- a/www/lib/crypto-js/mode-ofb.js
+++ /dev/null
@@ -1,54 +0,0 @@
-;(function (root, factory, undef) {
- if (typeof exports === "object") {
- // CommonJS
- module.exports = exports = factory(require("./core"), require("./cipher-core"));
- }
- else if (typeof define === "function" && define.amd) {
- // AMD
- define(["./core", "./cipher-core"], factory);
- }
- else {
- // Global (browser)
- factory(root.CryptoJS);
- }
-}(this, function (CryptoJS) {
-
- /**
- * Output Feedback block mode.
- */
- CryptoJS.mode.OFB = (function () {
- var OFB = CryptoJS.lib.BlockCipherMode.extend();
-
- var Encryptor = OFB.Encryptor = OFB.extend({
- processBlock: function (words, offset) {
- // Shortcuts
- var cipher = this._cipher
- var blockSize = cipher.blockSize;
- var iv = this._iv;
- var keystream = this._keystream;
-
- // Generate keystream
- if (iv) {
- keystream = this._keystream = iv.slice(0);
-
- // Remove IV for subsequent blocks
- this._iv = undefined;
- }
- cipher.encryptBlock(keystream, 0);
-
- // Encrypt
- for (var i = 0; i < blockSize; i++) {
- words[offset + i] ^= keystream[i];
- }
- }
- });
-
- OFB.Decryptor = Encryptor;
-
- return OFB;
- }());
-
-
- return CryptoJS.mode.OFB;
-
-})); \ No newline at end of file