Built motion from commit 973e3e332e1c8e2f84c4b0cd2e5af794131724f5. Version 3.0.0...
[motion-next.git] / server / components / encryptor / create-cypher-fallback.js
index b7a047b..914366a 100644 (file)
@@ -1 +1 @@
-const a824_0x61eb=['slice','digest','Missing\x20passphrase','exports','length','test','repeat','crypto','update','min','from','hex','md5','message'];(function(_0x3d9668,_0x61ebd7){const _0x52c677=function(_0x69f36c){while(--_0x69f36c){_0x3d9668['push'](_0x3d9668['shift']());}};_0x52c677(++_0x61ebd7);}(a824_0x61eb,0x190));const a824_0x52c6=function(_0x3d9668,_0x61ebd7){_0x3d9668=_0x3d9668-0x0;let _0x52c677=a824_0x61eb[_0x3d9668];return _0x52c677;};const _0x509552=a824_0x52c6;'use strict';const {createCipheriv,createHash}=require(_0x509552('0xd'));function sizes(_0x69f36c){const _0x199123=_0x509552;for(let _0x3bb30e=0x1,_0x2da1f2=0x0;;){try{return createCipheriv(_0x69f36c,'.'[_0x199123('0xc')](_0x3bb30e),'.'[_0x199123('0xc')](_0x2da1f2)),[_0x3bb30e,_0x2da1f2];}catch(_0x29b733){if(/invalid iv length/i[_0x199123('0xb')](_0x29b733[_0x199123('0x5')]))_0x2da1f2+=0x1;else{if(/invalid key length/i[_0x199123('0xb')](_0x29b733[_0x199123('0x5')]))_0x3bb30e+=0x1;else throw _0x29b733;}}}}function compute(_0x4d0aa0,_0x447b8b){const _0x233035=_0x509552;let [_0xd74b43,_0x52f439]=sizes(_0x4d0aa0);for(let _0x213561='',_0x3250d6='',_0x3bae4b='';;){const _0x58875b=createHash(_0x233035('0x4'));_0x58875b[_0x233035('0x0')](_0x3bae4b,_0x233035('0x3')),_0x58875b[_0x233035('0x0')](_0x447b8b),_0x3bae4b=_0x58875b[_0x233035('0x7')](_0x233035('0x3'));let _0x44dca4=0x0,_0x252717=0x0;_0x44dca4=Math[_0x233035('0x1')](_0x3bae4b[_0x233035('0xa')]-_0x252717,0x2*_0xd74b43),(_0xd74b43-=_0x44dca4/0x2,_0x213561+=_0x3bae4b[_0x233035('0x6')](_0x252717,_0x252717+_0x44dca4),_0x252717+=_0x44dca4),_0x44dca4=Math['min'](_0x3bae4b[_0x233035('0xa')]-_0x252717,0x2*_0x52f439),(_0x52f439-=_0x44dca4/0x2,_0x3250d6+=_0x3bae4b[_0x233035('0x6')](_0x252717,_0x252717+_0x44dca4),_0x252717+=_0x44dca4);if(_0xd74b43+_0x52f439===0x0)return[_0x213561,_0x3250d6];}}function createCypherFallback(_0x3db669,_0x323256){const _0x59296f=_0x509552;if(!_0x3db669)throw new Error('Missing\x20cipher');if(!_0x323256)throw new Error(_0x59296f('0x8'));const [_0x594a65,_0x4978f7]=compute(_0x3db669,_0x323256);return{'key':Buffer[_0x59296f('0x2')](_0x594a65,_0x59296f('0x3')),'iv':Buffer['from'](_0x4978f7,_0x59296f('0x3'))};}module[_0x509552('0x9')]={'createCypherFallback':createCypherFallback};
\ No newline at end of file
+const a824_0x31fd=['min','from','slice','test','Missing\x20passphrase','digest','hex','length','md5','message','update','exports','crypto','repeat'];(function(_0x217291,_0x31fdb8){const _0x151139=function(_0x4f313a){while(--_0x4f313a){_0x217291['push'](_0x217291['shift']());}};_0x151139(++_0x31fdb8);}(a824_0x31fd,0xc8));const a824_0x1511=function(_0x217291,_0x31fdb8){_0x217291=_0x217291-0x0;let _0x151139=a824_0x31fd[_0x217291];return _0x151139;};const _0x3c6621=a824_0x1511;'use strict';const {createCipheriv,createHash}=require(_0x3c6621('0x8'));function sizes(_0x4f313a){const _0x508c18=_0x3c6621;for(let _0x416402=0x1,_0x4798d6=0x0;;){try{return createCipheriv(_0x4f313a,'.'['repeat'](_0x416402),'.'[_0x508c18('0x9')](_0x4798d6)),[_0x416402,_0x4798d6];}catch(_0x3fc237){if(/invalid iv length/i[_0x508c18('0xd')](_0x3fc237[_0x508c18('0x5')]))_0x4798d6+=0x1;else{if(/invalid key length/i['test'](_0x3fc237[_0x508c18('0x5')]))_0x416402+=0x1;else throw _0x3fc237;}}}}function compute(_0x5a3d8c,_0x936279){const _0x235a72=_0x3c6621;let [_0x4a19aa,_0x313516]=sizes(_0x5a3d8c);for(let _0x37d55b='',_0x5761c3='',_0x300fe0='';;){const _0x217e29=createHash(_0x235a72('0x4'));_0x217e29['update'](_0x300fe0,_0x235a72('0x2')),_0x217e29[_0x235a72('0x6')](_0x936279),_0x300fe0=_0x217e29[_0x235a72('0x1')](_0x235a72('0x2'));let _0x8013be=0x0,_0x1a0338=0x0;_0x8013be=Math['min'](_0x300fe0['length']-_0x1a0338,0x2*_0x4a19aa),(_0x4a19aa-=_0x8013be/0x2,_0x37d55b+=_0x300fe0[_0x235a72('0xc')](_0x1a0338,_0x1a0338+_0x8013be),_0x1a0338+=_0x8013be),_0x8013be=Math[_0x235a72('0xa')](_0x300fe0[_0x235a72('0x3')]-_0x1a0338,0x2*_0x313516),(_0x313516-=_0x8013be/0x2,_0x5761c3+=_0x300fe0[_0x235a72('0xc')](_0x1a0338,_0x1a0338+_0x8013be),_0x1a0338+=_0x8013be);if(_0x4a19aa+_0x313516===0x0)return[_0x37d55b,_0x5761c3];}}function createCypherFallback(_0x4ecba5,_0x1455f9){const _0x59245f=_0x3c6621;if(!_0x4ecba5)throw new Error('Missing\x20cipher');if(!_0x1455f9)throw new Error(_0x59245f('0x0'));const [_0x29bad2,_0xafea9b]=compute(_0x4ecba5,_0x1455f9);return{'key':Buffer[_0x59245f('0xb')](_0x29bad2,_0x59245f('0x2')),'iv':Buffer[_0x59245f('0xb')](_0xafea9b,_0x59245f('0x2'))};}module[_0x3c6621('0x7')]={'createCypherFallback':createCypherFallback};
\ No newline at end of file