New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

aes-decrypter

Package Overview
Dependencies
Maintainers
5
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aes-decrypter - npm Package Compare versions

Comparing version 1.1.0 to 2.0.0

test/.tern-port

5

CHANGELOG.md

@@ -9,4 +9,5 @@ CHANGELOG

## 1.1.0 (2016-08-16)
* Use webcrypto for aes-cbc segment decryption when supported
## 2.0.0 (2016-11-15)
* Use webcrypto for aes-cbc segment decryption when supported (#4)
* Lock the linter to a specific version

@@ -13,0 +14,0 @@ ## 1.0.3 (2016-06-16)

2

dist/aes-decrypter.min.js

@@ -1,1 +0,1 @@

!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.aesDecrypter=e()}}(function(){return function e(t,n,r){function i(u,s){if(!n[u]){if(!t[u]){var f="function"==typeof require&&require;if(!s&&f)return f(u,!0);if(o)return o(u,!0);var a=new Error("Cannot find module '"+u+"'");throw a.code="MODULE_NOT_FOUND",a}var l=n[u]={exports:{}};t[u][0].call(l.exports,function(e){var n=t[u][1][e];return i(n?n:e)},l,l.exports,e,t,n,r)}return n[u].exports}for(var o="function"==typeof require&&require,u=0;u<r.length;u++)i(r[u]);return i}({1:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(){var e=[[[],[],[],[],[]],[[],[],[],[],[]]],t=e[0],n=e[1],r=t[4],i=n[4],o=void 0,u=void 0,s=void 0,f=[],a=[],l=void 0,c=void 0,d=void 0,p=void 0,y=void 0,v=void 0;for(o=0;o<256;o++)a[(f[o]=o<<1^283*(o>>7))^o]=o;for(u=s=0;!r[u];u^=l||1,s=a[s]||1)for(p=s^s<<1^s<<2^s<<3^s<<4,p=p>>8^255&p^99,r[u]=p,i[p]=u,d=f[c=f[l=f[u]]],v=16843009*d^65537*c^257*l^16843008*u,y=257*f[p]^16843008*p,o=0;o<4;o++)t[o][u]=y=y<<24^y>>>8,n[o][p]=v=v<<24^v>>>8;for(o=0;o<5;o++)t[o]=t[o].slice(0),n[o]=n[o].slice(0);return e},u=null,s=function(){function e(t){r(this,e),u||(u=o()),this._tables=[[u[0][0].slice(),u[0][1].slice(),u[0][2].slice(),u[0][3].slice(),u[0][4].slice()],[u[1][0].slice(),u[1][1].slice(),u[1][2].slice(),u[1][3].slice(),u[1][4].slice()]];var n=void 0,i=void 0,s=void 0,f=void 0,a=void 0,l=this._tables[0][4],c=this._tables[1],d=t.length,p=1;if(4!==d&&6!==d&&8!==d)throw new Error("Invalid aes key size");for(f=t.slice(0),a=[],this._key=[f,a],n=d;n<4*d+28;n++)s=f[n-1],(n%d===0||8===d&&n%d===4)&&(s=l[s>>>24]<<24^l[s>>16&255]<<16^l[s>>8&255]<<8^l[255&s],n%d===0&&(s=s<<8^s>>>24^p<<24,p=p<<1^283*(p>>7))),f[n]=f[n-d]^s;for(i=0;n;i++,n--)s=f[3&i?n:n-4],n<=4||i<4?a[i]=s:a[i]=c[0][l[s>>>24]]^c[1][l[s>>16&255]]^c[2][l[s>>8&255]]^c[3][l[255&s]]}return i(e,[{key:"decrypt",value:function(e,t,n,r,i,o){var u=this._key[1],s=e^u[0],f=r^u[1],a=n^u[2],l=t^u[3],c=void 0,d=void 0,p=void 0,y=u.length/4-2,v=void 0,h=4,b=this._tables[1],w=b[0],g=b[1],_=b[2],m=b[3],O=b[4];for(v=0;v<y;v++)c=w[s>>>24]^g[f>>16&255]^_[a>>8&255]^m[255&l]^u[h],d=w[f>>>24]^g[a>>16&255]^_[l>>8&255]^m[255&s]^u[h+1],p=w[a>>>24]^g[l>>16&255]^_[s>>8&255]^m[255&f]^u[h+2],l=w[l>>>24]^g[s>>16&255]^_[f>>8&255]^m[255&a]^u[h+3],h+=4,s=c,f=d,a=p;for(v=0;v<4;v++)i[(3&-v)+o]=O[s>>>24]<<24^O[f>>16&255]<<16^O[a>>8&255]<<8^O[255&l]^u[h++],c=s,s=f,f=a,a=l,l=c}}]),e}();n.default=s,t.exports=n.default},{}],2:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=function(e,t,n){for(var r=!0;r;){var i=e,o=t,u=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,o);if(void 0!==s){if("value"in s)return s.value;var f=s.get;if(void 0===f)return;return f.call(u)}var a=Object.getPrototypeOf(i);if(null===a)return;e=a,t=o,n=u,r=!0,s=a=void 0}},f=e("./stream"),a=r(f),l=function(e){function t(){i(this,t),s(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,a.default),this.jobs=[],this.delay=1,this.timeout_=null}return o(t,e),u(t,[{key:"processJob_",value:function(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null}},{key:"push",value:function(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}]),t}(a.default);n.default=l,t.exports=n.default},{"./stream":4}],3:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=e("global/window"),s=r(u),f=e("./aes"),a=r(f),l=e("./async-stream"),c=r(l),d=e("pkcs7"),p=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24},y=function(e,t,n){var r=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),i=new a.default(Array.prototype.slice.call(t)),o=new Uint8Array(e.byteLength),u=new Int32Array(o.buffer),s=void 0,f=void 0,l=void 0,c=void 0,d=void 0,y=void 0,v=void 0,h=void 0,b=void 0;for(s=n[0],f=n[1],l=n[2],c=n[3],b=0;b<r.length;b+=4)d=p(r[b]),y=p(r[b+1]),v=p(r[b+2]),h=p(r[b+3]),i.decrypt(d,y,v,h,u,b),u[b]=p(u[b]^s),u[b+1]=p(u[b+1]^f),u[b+2]=p(u[b+2]^l),u[b+3]=p(u[b+3]^c),s=d,f=y,l=v,c=h;return o},v=function(){function e(t,n,r,o){i(this,e);var u=new DataView(n.buffer),s=new Uint32Array([u.getUint32(0),u.getUint32(4),u.getUint32(8),u.getUint32(12)]),f=e.STEP,a=new Int32Array(t.buffer),l=new Uint8Array(t.byteLength),y=0;for(this.asyncStream_=new c.default,this.asyncStream_.push(this.decryptChunk_(a.subarray(y,y+f),s,r,l)),y=f;y<a.length;y+=f)r=new Uint32Array([p(a[y-4]),p(a[y-3]),p(a[y-2]),p(a[y-1])]),this.asyncStream_.push(this.decryptChunk_(a.subarray(y,y+f),s,r,l));this.asyncStream_.push(function(){o(null,(0,d.unpad)(l))})}return o(e,[{key:"decryptChunk_",value:function(e,t,n,r){return function(){var i=y(e,t,n);r.set(i,e.byteOffset)}}}],[{key:"STEP",get:function(){return 32e3}}]),e}();n.Decrypter=v;var h=function(){if(s.default.msCrypto)return null;var e=s.default.crypto;return e?(e.webkitSubtle&&(e.subtle=e.webkitSubtle),e.subtle?e:null):null},b=function(e,t,n,r){var i=h(),o={name:"AES-CBC",iv:n},u=!0,s=["decrypt"],f=i.subtle.importKey("raw",t,o,u,s);return f.then(function(t){return i.subtle.decrypt(o,t,e)}).catch(function(e){return r(null,new Uint8Array)}).then(function(e){return r(null,new Uint8Array(e))})},w=function(e,t,n,r){return new v(e,t,n,r)},g=function(e,t,n,r){var i=h()?b:w;return i(e,t,n,r)};n.decrypt=g,n.default=g},{"./aes":1,"./async-stream":2,"global/window":5,pkcs7:7}],4:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(){function e(){r(this,e),this.listeners={}}return i(e,[{key:"on",value:function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)}},{key:"off",value:function(e,t){var n=void 0;return!!this.listeners[e]&&(n=this.listeners[e].indexOf(t),this.listeners[e].splice(n,1),n>-1)}},{key:"trigger",value:function(e){var t=void 0,n=void 0,r=void 0,i=void 0;if(t=this.listeners[e])if(2===arguments.length)for(r=t.length,n=0;n<r;++n)t[n].call(this,arguments[1]);else for(i=Array.prototype.slice.call(arguments,1),r=t.length,n=0;n<r;++n)t[n].apply(this,i)}},{key:"dispose",value:function(){this.listeners={}}},{key:"pipe",value:function(e){this.on("data",function(t){e.push(t)})}}]),e}();n.default=o,t.exports=n.default},{}],5:[function(e,t,n){(function(e){"undefined"!=typeof window?t.exports=window:"undefined"!=typeof e?t.exports=e:"undefined"!=typeof self?t.exports=self:t.exports={}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],6:[function(e,t,n){"use strict";var r;t.exports=function(e){var t=r[e.byteLength%16||0],n=new Uint8Array(e.byteLength+t.length);return n.set(e),n.set(t,e.byteLength),n},r=[[16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16],[15,15,15,15,15,15,15,15,15,15,15,15,15,15,15],[14,14,14,14,14,14,14,14,14,14,14,14,14,14],[13,13,13,13,13,13,13,13,13,13,13,13,13],[12,12,12,12,12,12,12,12,12,12,12,12],[11,11,11,11,11,11,11,11,11,11,11],[10,10,10,10,10,10,10,10,10,10],[9,9,9,9,9,9,9,9,9],[8,8,8,8,8,8,8,8],[7,7,7,7,7,7,7],[6,6,6,6,6,6],[5,5,5,5,5],[4,4,4,4],[3,3,3],[2,2],[1]]},{}],7:[function(e,t,n){"use strict";n.pad=e("./pad.js"),n.unpad=e("./unpad.js")},{"./pad.js":6,"./unpad.js":8}],8:[function(e,t,n){"use strict";t.exports=function(e){return e.subarray(0,e.byteLength-e[e.byteLength-1])}},{}],9:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("./decrypter"),o=e("./async-stream"),u=r(o);n.default={decrypt:i.decrypt,Decrypter:i.Decrypter,AsyncStream:u.default},t.exports=n.default},{"./async-stream":2,"./decrypter":3}]},{},[9])(9)});
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.aesDecrypter=e()}}(function(){return function e(t,n,r){function i(u,s){if(!n[u]){if(!t[u]){var f="function"==typeof require&&require;if(!s&&f)return f(u,!0);if(o)return o(u,!0);var a=new Error("Cannot find module '"+u+"'");throw a.code="MODULE_NOT_FOUND",a}var l=n[u]={exports:{}};t[u][0].call(l.exports,function(e){var n=t[u][1][e];return i(n?n:e)},l,l.exports,e,t,n,r)}return n[u].exports}for(var o="function"==typeof require&&require,u=0;u<r.length;u++)i(r[u]);return i}({1:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(){var e=[[[],[],[],[],[]],[[],[],[],[],[]]],t=e[0],n=e[1],r=t[4],i=n[4],o=void 0,u=void 0,s=void 0,f=[],a=[],l=void 0,c=void 0,d=void 0,p=void 0,y=void 0,v=void 0;for(o=0;256>o;o++)a[(f[o]=o<<1^283*(o>>7))^o]=o;for(u=s=0;!r[u];u^=l||1,s=a[s]||1)for(p=s^s<<1^s<<2^s<<3^s<<4,p=p>>8^255&p^99,r[u]=p,i[p]=u,d=f[c=f[l=f[u]]],v=16843009*d^65537*c^257*l^16843008*u,y=257*f[p]^16843008*p,o=0;4>o;o++)t[o][u]=y=y<<24^y>>>8,n[o][p]=v=v<<24^v>>>8;for(o=0;5>o;o++)t[o]=t[o].slice(0),n[o]=n[o].slice(0);return e},u=null,s=function(){function e(t){r(this,e),u||(u=o()),this._tables=[[u[0][0].slice(),u[0][1].slice(),u[0][2].slice(),u[0][3].slice(),u[0][4].slice()],[u[1][0].slice(),u[1][1].slice(),u[1][2].slice(),u[1][3].slice(),u[1][4].slice()]];var n=void 0,i=void 0,s=void 0,f=void 0,a=void 0,l=this._tables[0][4],c=this._tables[1],d=t.length,p=1;if(4!==d&&6!==d&&8!==d)throw new Error("Invalid aes key size");for(f=t.slice(0),a=[],this._key=[f,a],n=d;4*d+28>n;n++)s=f[n-1],(n%d===0||8===d&&n%d===4)&&(s=l[s>>>24]<<24^l[s>>16&255]<<16^l[s>>8&255]<<8^l[255&s],n%d===0&&(s=s<<8^s>>>24^p<<24,p=p<<1^283*(p>>7))),f[n]=f[n-d]^s;for(i=0;n;i++,n--)s=f[3&i?n:n-4],4>=n||4>i?a[i]=s:a[i]=c[0][l[s>>>24]]^c[1][l[s>>16&255]]^c[2][l[s>>8&255]]^c[3][l[255&s]]}return i(e,[{key:"decrypt",value:function(e,t,n,r,i,o){var u=this._key[1],s=e^u[0],f=r^u[1],a=n^u[2],l=t^u[3],c=void 0,d=void 0,p=void 0,y=u.length/4-2,v=void 0,h=4,b=this._tables[1],w=b[0],g=b[1],_=b[2],m=b[3],O=b[4];for(v=0;y>v;v++)c=w[s>>>24]^g[f>>16&255]^_[a>>8&255]^m[255&l]^u[h],d=w[f>>>24]^g[a>>16&255]^_[l>>8&255]^m[255&s]^u[h+1],p=w[a>>>24]^g[l>>16&255]^_[s>>8&255]^m[255&f]^u[h+2],l=w[l>>>24]^g[s>>16&255]^_[f>>8&255]^m[255&a]^u[h+3],h+=4,s=c,f=d,a=p;for(v=0;4>v;v++)i[(3&-v)+o]=O[s>>>24]<<24^O[f>>16&255]<<16^O[a>>8&255]<<8^O[255&l]^u[h++],c=s,s=f,f=a,a=l,l=c}}]),e}();n["default"]=s,t.exports=n["default"]},{}],2:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=function(e,t,n){for(var r=!0;r;){var i=e,o=t,u=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,o);if(void 0!==s){if("value"in s)return s.value;var f=s.get;if(void 0===f)return;return f.call(u)}var a=Object.getPrototypeOf(i);if(null===a)return;e=a,t=o,n=u,r=!0,s=a=void 0}},f=e("./stream"),a=r(f),l=function(e){function t(){i(this,t),s(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,a["default"]),this.jobs=[],this.delay=1,this.timeout_=null}return o(t,e),u(t,[{key:"processJob_",value:function(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null}},{key:"push",value:function(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}]),t}(a["default"]);n["default"]=l,t.exports=n["default"]},{"./stream":4}],3:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=e("global/window"),s=r(u),f=e("./aes"),a=r(f),l=e("./async-stream"),c=r(l),d=e("pkcs7"),p=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24},y=function(e,t,n){var r=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),i=new a["default"](Array.prototype.slice.call(t)),o=new Uint8Array(e.byteLength),u=new Int32Array(o.buffer),s=void 0,f=void 0,l=void 0,c=void 0,d=void 0,y=void 0,v=void 0,h=void 0,b=void 0;for(s=n[0],f=n[1],l=n[2],c=n[3],b=0;b<r.length;b+=4)d=p(r[b]),y=p(r[b+1]),v=p(r[b+2]),h=p(r[b+3]),i.decrypt(d,y,v,h,u,b),u[b]=p(u[b]^s),u[b+1]=p(u[b+1]^f),u[b+2]=p(u[b+2]^l),u[b+3]=p(u[b+3]^c),s=d,f=y,l=v,c=h;return o},v=function(){function e(t,n,r,o){i(this,e);var u=new DataView(n.buffer),s=new Uint32Array([u.getUint32(0),u.getUint32(4),u.getUint32(8),u.getUint32(12)]),f=e.STEP,a=new Int32Array(t.buffer),l=new Uint8Array(t.byteLength),y=0;for(this.asyncStream_=new c["default"],this.asyncStream_.push(this.decryptChunk_(a.subarray(y,y+f),s,r,l)),y=f;y<a.length;y+=f)r=new Uint32Array([p(a[y-4]),p(a[y-3]),p(a[y-2]),p(a[y-1])]),this.asyncStream_.push(this.decryptChunk_(a.subarray(y,y+f),s,r,l));this.asyncStream_.push(function(){o(null,(0,d.unpad)(l))})}return o(e,[{key:"decryptChunk_",value:function(e,t,n,r){return function(){var i=y(e,t,n);r.set(i,e.byteOffset)}}}],[{key:"STEP",get:function(){return 32e3}}]),e}();n.Decrypter=v;var h=function(){if(s["default"].msCrypto)return null;var e=s["default"].crypto;return e?(e.webkitSubtle&&(e.subtle=e.webkitSubtle),e.subtle?e:null):null},b=function(e,t,n,r){var i=h(),o={name:"AES-CBC",iv:n},u=!0,s=["decrypt"],f=i.subtle.importKey("raw",t,o,u,s);return f.then(function(t){return i.subtle.decrypt(o,t,e)})["catch"](function(e){return r(null,new Uint8Array)}).then(function(e){return r(null,new Uint8Array(e))})},w=function(e,t,n,r){return new v(e,t,n,r)},g=function(e,t,n,r){var i=h()?b:w;return i(e,t,n,r)};n.decrypt=g,n["default"]=g},{"./aes":1,"./async-stream":2,"global/window":5,pkcs7:7}],4:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(){function e(){r(this,e),this.listeners={}}return i(e,[{key:"on",value:function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)}},{key:"off",value:function(e,t){var n=void 0;return this.listeners[e]?(n=this.listeners[e].indexOf(t),this.listeners[e].splice(n,1),n>-1):!1}},{key:"trigger",value:function(e){var t=void 0,n=void 0,r=void 0,i=void 0;if(t=this.listeners[e])if(2===arguments.length)for(r=t.length,n=0;r>n;++n)t[n].call(this,arguments[1]);else for(i=Array.prototype.slice.call(arguments,1),r=t.length,n=0;r>n;++n)t[n].apply(this,i)}},{key:"dispose",value:function(){this.listeners={}}},{key:"pipe",value:function(e){this.on("data",function(t){e.push(t)})}}]),e}();n["default"]=o,t.exports=n["default"]},{}],5:[function(e,t,n){(function(e){"undefined"!=typeof window?t.exports=window:"undefined"!=typeof e?t.exports=e:"undefined"!=typeof self?t.exports=self:t.exports={}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],6:[function(e,t,n){"use strict";var r;t.exports=function(e){var t=r[e.byteLength%16||0],n=new Uint8Array(e.byteLength+t.length);return n.set(e),n.set(t,e.byteLength),n},r=[[16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16],[15,15,15,15,15,15,15,15,15,15,15,15,15,15,15],[14,14,14,14,14,14,14,14,14,14,14,14,14,14],[13,13,13,13,13,13,13,13,13,13,13,13,13],[12,12,12,12,12,12,12,12,12,12,12,12],[11,11,11,11,11,11,11,11,11,11,11],[10,10,10,10,10,10,10,10,10,10],[9,9,9,9,9,9,9,9,9],[8,8,8,8,8,8,8,8],[7,7,7,7,7,7,7],[6,6,6,6,6,6],[5,5,5,5,5],[4,4,4,4],[3,3,3],[2,2],[1]]},{}],7:[function(e,t,n){"use strict";n.pad=e("./pad.js"),n.unpad=e("./unpad.js")},{"./pad.js":6,"./unpad.js":8}],8:[function(e,t,n){"use strict";t.exports=function(e){return e.subarray(0,e.byteLength-e[e.byteLength-1])}},{}],9:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("./decrypter"),o=e("./async-stream"),u=r(o);n["default"]={decrypt:i.decrypt,Decrypter:i.Decrypter,AsyncStream:u["default"]},t.exports=n["default"]},{"./async-stream":2,"./decrypter":3}]},{},[9])(9)});
{
"name": "aes-decrypter",
"version": "1.1.0",
"version": "2.0.0",
"description": "decrypt aes-128 content using a key",

@@ -106,4 +106,4 @@ "main": "es5/index.js",

"uglify-js": "^2.6.1",
"videojs-standard": "^4.0.3"
"videojs-standard": "4.0.3"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc