aes-decrypter
Advanced tools
Comparing version 3.0.1-0 to 3.0.1-1
@@ -1,2 +0,2 @@ | ||
/*! @name aes-decrypter @version 3.0.1-0 @license Apache-2.0 */ | ||
/*! @name aes-decrypter @version 3.0.1-1 @license Apache-2.0 */ | ||
'use strict'; | ||
@@ -10,3 +10,3 @@ | ||
var _inheritsLoose = _interopDefault(require('@babel/runtime/helpers/inheritsLoose')); | ||
var vhsUtils = require('@videojs/vhs-utils'); | ||
var Stream = _interopDefault(require('@videojs/vhs-utils/dist/stream.es.js')); | ||
var pkcs7 = require('pkcs7'); | ||
@@ -261,3 +261,3 @@ | ||
_this = _Stream.call(this, vhsUtils.Stream) || this; | ||
_this = _Stream.call(this, Stream) || this; | ||
_this.jobs = []; | ||
@@ -302,3 +302,3 @@ _this.delay = 1; | ||
return AsyncStream; | ||
}(vhsUtils.Stream); | ||
}(Stream); | ||
@@ -305,0 +305,0 @@ /** |
@@ -1,5 +0,5 @@ | ||
/*! @name aes-decrypter @version 3.0.1-0 @license Apache-2.0 */ | ||
/*! @name aes-decrypter @version 3.0.1-1 @license Apache-2.0 */ | ||
import _createClass from '@babel/runtime/helpers/createClass'; | ||
import _inheritsLoose from '@babel/runtime/helpers/inheritsLoose'; | ||
import { Stream } from '@videojs/vhs-utils'; | ||
import Stream from '@videojs/vhs-utils/dist/stream.es.js'; | ||
import { unpad } from 'pkcs7'; | ||
@@ -6,0 +6,0 @@ |
@@ -1,10 +0,8 @@ | ||
/*! @name aes-decrypter @version 3.0.1-0 @license Apache-2.0 */ | ||
/*! @name aes-decrypter @version 3.0.1-1 @license Apache-2.0 */ | ||
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('global/window')) : | ||
typeof define === 'function' && define.amd ? define(['exports', 'global/window'], factory) : | ||
(global = global || self, factory(global.aesDecrypter = {}, global.window)); | ||
}(this, function (exports, window) { 'use strict'; | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : | ||
typeof define === 'function' && define.amd ? define(['exports'], factory) : | ||
(global = global || self, factory(global.aesDecrypter = {})); | ||
}(this, function (exports) { 'use strict'; | ||
window = window && window.hasOwnProperty('default') ? window['default'] : window; | ||
function _defineProperties(target, props) { | ||
@@ -267,167 +265,3 @@ for (var i = 0; i < props.length; i++) { | ||
function createCommonjsModule(fn, module) { | ||
return module = { exports: {} }, fn(module, module.exports), module.exports; | ||
} | ||
var urlToolkit = createCommonjsModule(function (module, exports) { | ||
// see https://tools.ietf.org/html/rfc1808 | ||
/* jshint ignore:start */ | ||
(function(root) { | ||
/* jshint ignore:end */ | ||
var URL_REGEX = /^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/\?#]*\/)*.*?)??(;.*?)?(\?.*?)?(#.*?)?$/; | ||
var FIRST_SEGMENT_REGEX = /^([^\/?#]*)(.*)$/; | ||
var SLASH_DOT_REGEX = /(?:\/|^)\.(?=\/)/g; | ||
var SLASH_DOT_DOT_REGEX = /(?:\/|^)\.\.\/(?!\.\.\/).*?(?=\/)/g; | ||
var URLToolkit = { // jshint ignore:line | ||
// If opts.alwaysNormalize is true then the path will always be normalized even when it starts with / or // | ||
// E.g | ||
// With opts.alwaysNormalize = false (default, spec compliant) | ||
// http://a.com/b/cd + /e/f/../g => http://a.com/e/f/../g | ||
// With opts.alwaysNormalize = true (not spec compliant) | ||
// http://a.com/b/cd + /e/f/../g => http://a.com/e/g | ||
buildAbsoluteURL: function(baseURL, relativeURL, opts) { | ||
opts = opts || {}; | ||
// remove any remaining space and CRLF | ||
baseURL = baseURL.trim(); | ||
relativeURL = relativeURL.trim(); | ||
if (!relativeURL) { | ||
// 2a) If the embedded URL is entirely empty, it inherits the | ||
// entire base URL (i.e., is set equal to the base URL) | ||
// and we are done. | ||
if (!opts.alwaysNormalize) { | ||
return baseURL; | ||
} | ||
var basePartsForNormalise = URLToolkit.parseURL(baseURL); | ||
if (!basePartsForNormalise) { | ||
throw new Error('Error trying to parse base URL.'); | ||
} | ||
basePartsForNormalise.path = URLToolkit.normalizePath(basePartsForNormalise.path); | ||
return URLToolkit.buildURLFromParts(basePartsForNormalise); | ||
} | ||
var relativeParts = URLToolkit.parseURL(relativeURL); | ||
if (!relativeParts) { | ||
throw new Error('Error trying to parse relative URL.'); | ||
} | ||
if (relativeParts.scheme) { | ||
// 2b) If the embedded URL starts with a scheme name, it is | ||
// interpreted as an absolute URL and we are done. | ||
if (!opts.alwaysNormalize) { | ||
return relativeURL; | ||
} | ||
relativeParts.path = URLToolkit.normalizePath(relativeParts.path); | ||
return URLToolkit.buildURLFromParts(relativeParts); | ||
} | ||
var baseParts = URLToolkit.parseURL(baseURL); | ||
if (!baseParts) { | ||
throw new Error('Error trying to parse base URL.'); | ||
} | ||
if (!baseParts.netLoc && baseParts.path && baseParts.path[0] !== '/') { | ||
// If netLoc missing and path doesn't start with '/', assume everthing before the first '/' is the netLoc | ||
// This causes 'example.com/a' to be handled as '//example.com/a' instead of '/example.com/a' | ||
var pathParts = FIRST_SEGMENT_REGEX.exec(baseParts.path); | ||
baseParts.netLoc = pathParts[1]; | ||
baseParts.path = pathParts[2]; | ||
} | ||
if (baseParts.netLoc && !baseParts.path) { | ||
baseParts.path = '/'; | ||
} | ||
var builtParts = { | ||
// 2c) Otherwise, the embedded URL inherits the scheme of | ||
// the base URL. | ||
scheme: baseParts.scheme, | ||
netLoc: relativeParts.netLoc, | ||
path: null, | ||
params: relativeParts.params, | ||
query: relativeParts.query, | ||
fragment: relativeParts.fragment | ||
}; | ||
if (!relativeParts.netLoc) { | ||
// 3) If the embedded URL's <net_loc> is non-empty, we skip to | ||
// Step 7. Otherwise, the embedded URL inherits the <net_loc> | ||
// (if any) of the base URL. | ||
builtParts.netLoc = baseParts.netLoc; | ||
// 4) If the embedded URL path is preceded by a slash "/", the | ||
// path is not relative and we skip to Step 7. | ||
if (relativeParts.path[0] !== '/') { | ||
if (!relativeParts.path) { | ||
// 5) If the embedded URL path is empty (and not preceded by a | ||
// slash), then the embedded URL inherits the base URL path | ||
builtParts.path = baseParts.path; | ||
// 5a) if the embedded URL's <params> is non-empty, we skip to | ||
// step 7; otherwise, it inherits the <params> of the base | ||
// URL (if any) and | ||
if (!relativeParts.params) { | ||
builtParts.params = baseParts.params; | ||
// 5b) if the embedded URL's <query> is non-empty, we skip to | ||
// step 7; otherwise, it inherits the <query> of the base | ||
// URL (if any) and we skip to step 7. | ||
if (!relativeParts.query) { | ||
builtParts.query = baseParts.query; | ||
} | ||
} | ||
} else { | ||
// 6) The last segment of the base URL's path (anything | ||
// following the rightmost slash "/", or the entire path if no | ||
// slash is present) is removed and the embedded URL's path is | ||
// appended in its place. | ||
var baseURLPath = baseParts.path; | ||
var newPath = baseURLPath.substring(0, baseURLPath.lastIndexOf('/') + 1) + relativeParts.path; | ||
builtParts.path = URLToolkit.normalizePath(newPath); | ||
} | ||
} | ||
} | ||
if (builtParts.path === null) { | ||
builtParts.path = opts.alwaysNormalize ? URLToolkit.normalizePath(relativeParts.path) : relativeParts.path; | ||
} | ||
return URLToolkit.buildURLFromParts(builtParts); | ||
}, | ||
parseURL: function(url) { | ||
var parts = URL_REGEX.exec(url); | ||
if (!parts) { | ||
return null; | ||
} | ||
return { | ||
scheme: parts[1] || '', | ||
netLoc: parts[2] || '', | ||
path: parts[3] || '', | ||
params: parts[4] || '', | ||
query: parts[5] || '', | ||
fragment: parts[6] || '' | ||
}; | ||
}, | ||
normalizePath: function(path) { | ||
// The following operations are | ||
// then applied, in order, to the new path: | ||
// 6a) All occurrences of "./", where "." is a complete path | ||
// segment, are removed. | ||
// 6b) If the path ends with "." as a complete path segment, | ||
// that "." is removed. | ||
path = path.split('').reverse().join('').replace(SLASH_DOT_REGEX, ''); | ||
// 6c) All occurrences of "<segment>/../", where <segment> is a | ||
// complete path segment not equal to "..", are removed. | ||
// Removal of these path segments is performed iteratively, | ||
// removing the leftmost matching pattern on each iteration, | ||
// until no matching pattern remains. | ||
// 6d) If the path ends with "<segment>/..", where <segment> is a | ||
// complete path segment not equal to "..", that | ||
// "<segment>/.." is removed. | ||
while (path.length !== (path = path.replace(SLASH_DOT_DOT_REGEX, '')).length) {} // jshint ignore:line | ||
return path.split('').reverse().join(''); | ||
}, | ||
buildURLFromParts: function(parts) { | ||
return parts.scheme + parts.netLoc + parts.path + parts.params + parts.query + parts.fragment; | ||
} | ||
}; | ||
/* jshint ignore:start */ | ||
module.exports = URLToolkit; | ||
})(); | ||
/* jshint ignore:end */ | ||
}); | ||
/*! @name @videojs/vhs-utils @version 0.0.0 @license MIT */ | ||
/** | ||
@@ -555,4 +389,2 @@ * @file stream.js | ||
var Stream$1 = Stream; | ||
/** | ||
@@ -574,3 +406,3 @@ * A wrapper around the Stream class to use setTimeout | ||
_this = _Stream.call(this, Stream$1) || this; | ||
_this = _Stream.call(this, Stream) || this; | ||
_this.jobs = []; | ||
@@ -615,3 +447,3 @@ _this.delay = 1; | ||
return AsyncStream; | ||
}(Stream$1); | ||
}(Stream); | ||
@@ -618,0 +450,0 @@ /*! @name pkcs7 @version 1.0.3-1 @license Apache-2.0 */ |
@@ -1,5 +0,5 @@ | ||
/*! @name aes-decrypter @version 3.0.1-0 @license Apache-2.0 */ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("global/window")):"function"==typeof define&&define.amd?define(["exports","global/window"],e):e((t=t||self).aesDecrypter={},t.window)}(this,function(t,e){"use strict";function r(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}e=e&&e.hasOwnProperty("default")?e.default:e;var n=function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t},i=function(){var t,e,r,n,i,s,a,o,u=[[[],[],[],[],[]],[[],[],[],[],[]]],l=u[0],h=u[1],c=l[4],p=h[4],f=[],y=[];for(t=0;t<256;t++)y[(f[t]=t<<1^283*(t>>7))^t]=t;for(e=r=0;!c[e];e^=n||1,r=y[r]||1)for(s=(s=r^r<<1^r<<2^r<<3^r<<4)>>8^255&s^99,c[e]=s,p[s]=e,o=16843009*f[i=f[n=f[e]]]^65537*i^257*n^16843008*e,a=257*f[s]^16843008*s,t=0;t<4;t++)l[t][e]=a=a<<24^a>>>8,h[t][s]=o=o<<24^o>>>8;for(t=0;t<5;t++)l[t]=l[t].slice(0),h[t]=h[t].slice(0);return u},s=null,a=function(){function t(t){var e,r,n;s||(s=i()),this._tables=[[s[0][0].slice(),s[0][1].slice(),s[0][2].slice(),s[0][3].slice(),s[0][4].slice()],[s[1][0].slice(),s[1][1].slice(),s[1][2].slice(),s[1][3].slice(),s[1][4].slice()]];var a=this._tables[0][4],o=this._tables[1],u=t.length,l=1;if(4!==u&&6!==u&&8!==u)throw new Error("Invalid aes key size");var h=t.slice(0),c=[];for(this._key=[h,c],e=u;e<4*u+28;e++)n=h[e-1],(e%u==0||8===u&&e%u==4)&&(n=a[n>>>24]<<24^a[n>>16&255]<<16^a[n>>8&255]<<8^a[255&n],e%u==0&&(n=n<<8^n>>>24^l<<24,l=l<<1^283*(l>>7))),h[e]=h[e-u]^n;for(r=0;e;r++,e--)n=h[3&r?e:e-4],c[r]=e<=4||r<4?n:o[0][a[n>>>24]]^o[1][a[n>>16&255]]^o[2][a[n>>8&255]]^o[3][a[255&n]]}return t.prototype.decrypt=function(t,e,r,n,i,s){var a,o,u,l,h=this._key[1],c=t^h[0],p=n^h[1],f=r^h[2],y=e^h[3],m=h.length/4-2,b=4,d=this._tables[1],v=d[0],g=d[1],w=d[2],L=d[3],_=d[4];for(l=0;l<m;l++)a=v[c>>>24]^g[p>>16&255]^w[f>>8&255]^L[255&y]^h[b],o=v[p>>>24]^g[f>>16&255]^w[y>>8&255]^L[255&c]^h[b+1],u=v[f>>>24]^g[y>>16&255]^w[c>>8&255]^L[255&p]^h[b+2],y=v[y>>>24]^g[c>>16&255]^w[p>>8&255]^L[255&f]^h[b+3],b+=4,c=a,p=o,f=u;for(l=0;l<4;l++)i[(3&-l)+s]=_[c>>>24]<<24^_[p>>16&255]<<16^_[f>>8&255]<<8^_[255&y]^h[b++],a=c,c=p,p=f,f=y,y=a},t}();var o=function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e};!function(t,e){t(e={exports:{}},e.exports)}(function(t,e){var r,n,i,s,a;r=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/\?#]*\/)*.*?)??(;.*?)?(\?.*?)?(#.*?)?$/,n=/^([^\/?#]*)(.*)$/,i=/(?:\/|^)\.(?=\/)/g,s=/(?:\/|^)\.\.\/(?!\.\.\/).*?(?=\/)/g,a={buildAbsoluteURL:function(t,e,r){if(r=r||{},t=t.trim(),!(e=e.trim())){if(!r.alwaysNormalize)return t;var i=a.parseURL(t);if(!i)throw new Error("Error trying to parse base URL.");return i.path=a.normalizePath(i.path),a.buildURLFromParts(i)}var s=a.parseURL(e);if(!s)throw new Error("Error trying to parse relative URL.");if(s.scheme)return r.alwaysNormalize?(s.path=a.normalizePath(s.path),a.buildURLFromParts(s)):e;var o=a.parseURL(t);if(!o)throw new Error("Error trying to parse base URL.");if(!o.netLoc&&o.path&&"/"!==o.path[0]){var u=n.exec(o.path);o.netLoc=u[1],o.path=u[2]}o.netLoc&&!o.path&&(o.path="/");var l={scheme:o.scheme,netLoc:s.netLoc,path:null,params:s.params,query:s.query,fragment:s.fragment};if(!s.netLoc&&(l.netLoc=o.netLoc,"/"!==s.path[0]))if(s.path){var h=o.path,c=h.substring(0,h.lastIndexOf("/")+1)+s.path;l.path=a.normalizePath(c)}else l.path=o.path,s.params||(l.params=o.params,s.query||(l.query=o.query));return null===l.path&&(l.path=r.alwaysNormalize?a.normalizePath(s.path):s.path),a.buildURLFromParts(l)},parseURL:function(t){var e=r.exec(t);return e?{scheme:e[1]||"",netLoc:e[2]||"",path:e[3]||"",params:e[4]||"",query:e[5]||"",fragment:e[6]||""}:null},normalizePath:function(t){for(t=t.split("").reverse().join("").replace(i,"");t.length!==(t=t.replace(s,"")).length;);return t.split("").reverse().join("")},buildURLFromParts:function(t){return t.scheme+t.netLoc+t.path+t.params+t.query+t.fragment}},t.exports=a}); | ||
/*! @name @videojs/vhs-utils @version 0.0.0 @license MIT */var u=function(){function t(){this.listeners={}}var e=t.prototype;return e.on=function(t,e){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push(e)},e.off=function(t,e){if(!this.listeners[t])return!1;var r=this.listeners[t].indexOf(e);return this.listeners[t]=this.listeners[t].slice(0),this.listeners[t].splice(r,1),r>-1},e.trigger=function(t){var e=this.listeners[t];if(e)if(2===arguments.length)for(var r=e.length,n=0;n<r;++n)e[n].call(this,arguments[1]);else for(var i=Array.prototype.slice.call(arguments,1),s=e.length,a=0;a<s;++a)e[a].apply(this,i)},e.dispose=function(){this.listeners={}},e.pipe=function(t){this.on("data",function(e){t.push(e)})},t}(),l=function(t){function e(){var e;return(e=t.call(this,u)||this).jobs=[],e.delay=1,e.timeout_=null,e}o(e,t);var r=e.prototype;return r.processJob_=function(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null},r.push=function(t){this.jobs.push(t),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))},e}(u);var h=function(t){return t<<24|(65280&t)<<8|(16711680&t)>>8|t>>>24},c=function(t,e,r){var n,i,s,o,u,l,c,p,f,y=new Int32Array(t.buffer,t.byteOffset,t.byteLength>>2),m=new a(Array.prototype.slice.call(e)),b=new Uint8Array(t.byteLength),d=new Int32Array(b.buffer);for(n=r[0],i=r[1],s=r[2],o=r[3],f=0;f<y.length;f+=4)u=h(y[f]),l=h(y[f+1]),c=h(y[f+2]),p=h(y[f+3]),m.decrypt(u,l,c,p,d,f),d[f]=h(d[f]^n),d[f+1]=h(d[f+1]^i),d[f+2]=h(d[f+2]^s),d[f+3]=h(d[f+3]^o),n=u,i=l,s=c,o=p;return b},p=function(){function t(e,r,n,i){var s=t.STEP,a=new Int32Array(e.buffer),o=new Uint8Array(e.byteLength),u=0;for(this.asyncStream_=new l,this.asyncStream_.push(this.decryptChunk_(a.subarray(u,u+s),r,n,o)),u=s;u<a.length;u+=s)n=new Uint32Array([h(a[u-4]),h(a[u-3]),h(a[u-2]),h(a[u-1])]),this.asyncStream_.push(this.decryptChunk_(a.subarray(u,u+s),r,n,o));this.asyncStream_.push(function(){ | ||
/*! @name aes-decrypter @version 3.0.1-1 @license Apache-2.0 */ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).aesDecrypter={})}(this,function(t){"use strict";function e(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var r=function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t},n=function(){var t,e,r,n,i,s,o,u,c=[[[],[],[],[],[]],[[],[],[],[],[]]],l=c[0],f=c[1],a=l[4],h=f[4],y=[],p=[];for(t=0;t<256;t++)p[(y[t]=t<<1^283*(t>>7))^t]=t;for(e=r=0;!a[e];e^=n||1,r=p[r]||1)for(s=(s=r^r<<1^r<<2^r<<3^r<<4)>>8^255&s^99,a[e]=s,h[s]=e,u=16843009*y[i=y[n=y[e]]]^65537*i^257*n^16843008*e,o=257*y[s]^16843008*s,t=0;t<4;t++)l[t][e]=o=o<<24^o>>>8,f[t][s]=u=u<<24^u>>>8;for(t=0;t<5;t++)l[t]=l[t].slice(0),f[t]=f[t].slice(0);return c},i=null,s=function(){function t(t){var e,r,s;i||(i=n()),this._tables=[[i[0][0].slice(),i[0][1].slice(),i[0][2].slice(),i[0][3].slice(),i[0][4].slice()],[i[1][0].slice(),i[1][1].slice(),i[1][2].slice(),i[1][3].slice(),i[1][4].slice()]];var o=this._tables[0][4],u=this._tables[1],c=t.length,l=1;if(4!==c&&6!==c&&8!==c)throw new Error("Invalid aes key size");var f=t.slice(0),a=[];for(this._key=[f,a],e=c;e<4*c+28;e++)s=f[e-1],(e%c==0||8===c&&e%c==4)&&(s=o[s>>>24]<<24^o[s>>16&255]<<16^o[s>>8&255]<<8^o[255&s],e%c==0&&(s=s<<8^s>>>24^l<<24,l=l<<1^283*(l>>7))),f[e]=f[e-c]^s;for(r=0;e;r++,e--)s=f[3&r?e:e-4],a[r]=e<=4||r<4?s:u[0][o[s>>>24]]^u[1][o[s>>16&255]]^u[2][o[s>>8&255]]^u[3][o[255&s]]}return t.prototype.decrypt=function(t,e,r,n,i,s){var o,u,c,l,f=this._key[1],a=t^f[0],h=n^f[1],y=r^f[2],p=e^f[3],b=f.length/4-2,_=4,d=this._tables[1],v=d[0],g=d[1],m=d[2],w=d[3],A=d[4];for(l=0;l<b;l++)o=v[a>>>24]^g[h>>16&255]^m[y>>8&255]^w[255&p]^f[_],u=v[h>>>24]^g[y>>16&255]^m[p>>8&255]^w[255&a]^f[_+1],c=v[y>>>24]^g[p>>16&255]^m[a>>8&255]^w[255&h]^f[_+2],p=v[p>>>24]^g[a>>16&255]^m[h>>8&255]^w[255&y]^f[_+3],_+=4,a=o,h=u,y=c;for(l=0;l<4;l++)i[(3&-l)+s]=A[a>>>24]<<24^A[h>>16&255]<<16^A[y>>8&255]<<8^A[255&p]^f[_++],o=a,a=h,h=y,y=p,p=o},t}();var o=function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e},u=function(){function t(){this.listeners={}}var e=t.prototype;return e.on=function(t,e){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push(e)},e.off=function(t,e){if(!this.listeners[t])return!1;var r=this.listeners[t].indexOf(e);return this.listeners[t]=this.listeners[t].slice(0),this.listeners[t].splice(r,1),r>-1},e.trigger=function(t){var e=this.listeners[t];if(e)if(2===arguments.length)for(var r=e.length,n=0;n<r;++n)e[n].call(this,arguments[1]);else for(var i=Array.prototype.slice.call(arguments,1),s=e.length,o=0;o<s;++o)e[o].apply(this,i)},e.dispose=function(){this.listeners={}},e.pipe=function(t){this.on("data",function(e){t.push(e)})},t}(),c=function(t){function e(){var e;return(e=t.call(this,u)||this).jobs=[],e.delay=1,e.timeout_=null,e}o(e,t);var r=e.prototype;return r.processJob_=function(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null},r.push=function(t){this.jobs.push(t),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))},e}(u); | ||
/*! @name @videojs/vhs-utils @version 0.0.0 @license MIT */var l=function(t){return t<<24|(65280&t)<<8|(16711680&t)>>8|t>>>24},f=function(t,e,r){var n,i,o,u,c,f,a,h,y,p=new Int32Array(t.buffer,t.byteOffset,t.byteLength>>2),b=new s(Array.prototype.slice.call(e)),_=new Uint8Array(t.byteLength),d=new Int32Array(_.buffer);for(n=r[0],i=r[1],o=r[2],u=r[3],y=0;y<p.length;y+=4)c=l(p[y]),f=l(p[y+1]),a=l(p[y+2]),h=l(p[y+3]),b.decrypt(c,f,a,h,d,y),d[y]=l(d[y]^n),d[y+1]=l(d[y+1]^i),d[y+2]=l(d[y+2]^o),d[y+3]=l(d[y+3]^u),n=c,i=f,o=a,u=h;return _},a=function(){function t(e,r,n,i){var s=t.STEP,o=new Int32Array(e.buffer),u=new Uint8Array(e.byteLength),f=0;for(this.asyncStream_=new c,this.asyncStream_.push(this.decryptChunk_(o.subarray(f,f+s),r,n,u)),f=s;f<o.length;f+=s)n=new Uint32Array([l(o[f-4]),l(o[f-3]),l(o[f-2]),l(o[f-1])]),this.asyncStream_.push(this.decryptChunk_(o.subarray(f,f+s),r,n,u));this.asyncStream_.push(function(){ | ||
/*! @name pkcs7 @version 1.0.3-1 @license Apache-2.0 */ | ||
var t;i(null,(t=o).subarray(0,t.byteLength-t[t.byteLength-1]))})}return t.prototype.decryptChunk_=function(t,e,r,n){return function(){var i=c(t,e,r);n.set(i,t.byteOffset)}},n(t,null,[{key:"STEP",get:function(){return 32e3}}]),t}();t.AsyncStream=l,t.Decrypter=p,t.decrypt=c,Object.defineProperty(t,"__esModule",{value:!0})}); | ||
var t;i(null,(t=u).subarray(0,t.byteLength-t[t.byteLength-1]))})}return t.prototype.decryptChunk_=function(t,e,r,n){return function(){var i=f(t,e,r);n.set(i,t.byteOffset)}},r(t,null,[{key:"STEP",get:function(){return 32e3}}]),t}();t.AsyncStream=c,t.Decrypter=a,t.decrypt=f,Object.defineProperty(t,"__esModule",{value:!0})}); |
{ | ||
"name": "aes-decrypter", | ||
"version": "3.0.1-0", | ||
"version": "3.0.1-1", | ||
"description": "decrypt aes-128 content using a key", | ||
@@ -64,3 +64,2 @@ "main": "dist/aes-decrypter.cjs.js", | ||
"videojs-generate-rollup-config": "~5.0.1", | ||
"videojs-languages": "^2.0.0", | ||
"videojs-standard": "^8.0.3" | ||
@@ -67,0 +66,0 @@ }, |
/** | ||
* @file async-stream.js | ||
*/ | ||
import {Stream} from '@videojs/vhs-utils'; | ||
import Stream from '@videojs/vhs-utils/dist/stream.es.js'; | ||
@@ -6,0 +6,0 @@ /** |
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
9
1
78713
1932