PageSourceSearch

https://online.roboform.com/js/rf-api-ofs/ofs.js?vvv=202401311227

js roboform.com collected 2026-10-01 08:32:51 UTC 26,795 bytes, 243 lines download raw bytes

1// Copyright (C) 1999-2024 Siber Systems Inc. All Rights Reserved.
2var RfapiJS=RfapiJS||{};(function(){RfapiJS.traceJS
3;var t=RfapiJS.traceLevel,e=RfapiJS.SibErrType,r=RfapiJS.RfErrType,s=RfapiJS.logJS,n=RfapiJS.utils,i=RfapiJS.UTF8,a=RfapiJS.HTTP_Status_Code_OK,o=RfapiJS.UserDataFiles,_=RfapiJS.Binary,h=RfapiJS.StringConverter,f="ofs.js",c="undefined",m="rfosha2#$",u="###",y="101112131415161718191a1b1c1d1e1f",p=1,l=2,d=4,C=1
4;function b(){try{return"localStorage"in window&&null!==window.localStorage}catch(t){return!1}}function g(){t.FUNC_INOUT,
5this.m_nId=Math.floor(10001*Math.random()),this.m_ofs_CashedSalts={},this.m_ofs_CashedKeys={},this.m_ofs_CashedIterations={},
6this.m_ofs_DBCached={};var e=b();try{if(e){for(var r in localStorage)r.startsWith("rfosha#$")&&delete localStorage[r]
7;for(var r in localStorage)if(r.startsWith(m)){
8var s=r.substr(9,r.indexOf(u)-9),a=r.substr(r.indexOf(u)+3),o=n.hexToBytes(s),_=n.hexToBytes(a),h=i.bytesToString(o),f=i.bytesToString(_)
9;this.m_ofs_DBCached[h]||(this.m_ofs_DBCached[h]={}),this.m_ofs_DBCached[h][f]=localStorage[r]}}}catch(c){}t.FUNC_INOUT}
10g.prototype.ofs_ClearAccountsCache=function(){if(this.m_ofs_CashedSalts={},this.m_ofs_CashedKeys={},
11this.m_ofs_CashedIterations={},b())for(var t in localStorage)t.startsWith(m)&&delete localStorage[t]},
12g.prototype.ofs_ClearCacheForAccount=function(e,r){
13if(t.SPECIAL_CASE,r?(this.m_ofs_CashedSalts[e]&&this.m_ofs_CashedSalts[e][r]&&delete this.m_ofs_CashedSalts[e][r],
14this.m_ofs_CashedKeys[e]&&this.m_ofs_CashedKeys[e][r]&&delete this.m_ofs_CashedKeys[e][r],
15this.m_ofs_CashedIterations[e]&&this.m_ofs_CashedIterations[e][r]&&delete this.m_ofs_CashedIterations[e][r]):(delete this.m_ofs_CashedSalts[e],
16delete this.m_ofs_CashedKeys[e],delete this.m_ofs_CashedIterations[e]),b()){
17var s=n.bytesToHex(i.stringToBytes(e)),a=n.bytesToHex(i.stringToBytes(o.APP_DATA)),_=m+s+u+a
18;(!r||r&&r==o.APP_DATA)&&delete localStorage[_];var h=n.bytesToHex(i.stringToBytes(o.SYNC_DATA)),f=m+s+u+h
19;(!r||r&&r==o.SYNC_DATA)&&delete localStorage[f];var c=n.bytesToHex(i.stringToBytes(o.USER_DATA)),y=m+s+u+c
20;(!r||r&&r==o.USER_DATA)&&delete localStorage[y]}},g.prototype.ofs_SetData=function(e,r,s,a,o,_){try{
21for(var h=b(),f=n.bytesToHex(i.stringToBytes(o)),p=n.bytesToHex(i.stringToBytes(a)),l=m+f+u+p,d=[],C=0;C<e.length;C++)d.push(e[C])
22;for(C=0;C<r.length;C++)d.push(r[C]);var g=n.GetLittleEndianByteArrayFromInteger(s,4);for(C=0;C<g.length;C++)d.push(g[C])
23;var S=n.bytesToBase64(d),E=CryptoJS.enc.Latin1.parse(CryptoJS.enc.Latin1.stringify(CryptoJS.SHA256(_+_))),I=CryptoJS.enc.Hex.parse(y),B=CryptoJS.AES.encrypt(S,E,{
24iv:I}).toString(),O=CryptoJS.lib.CipherParams.create({ciphertext:CryptoJS.enc.Base64.parse(B)})
25;return void(S==CryptoJS.AES.decrypt(O,E,{iv:I}).toString(CryptoJS.enc.Utf8)?(t.SPECIAL_CASE,
26h&&(typeof localStorage[l]!=c&&localStorage[l]==B||(localStorage[l]=B)),
27this.m_ofs_CashedSalts[o]||(this.m_ofs_CashedSalts[o]={}),this.m_ofs_CashedSalts[o][a]=e,
28this.m_ofs_CashedKeys[o]||(this.m_ofs_CashedKeys[o]={}),this.m_ofs_CashedKeys[o][a]=r,
29this.m_ofs_CashedIterations[o]||(this.m_ofs_CashedIterations[o]={}),this.m_ofs_CashedIterations[o][a]=s):t.SPECIAL_CASE)
30}catch(v){t.SPECIAL_CASE}},g.prototype.ofs_GetData=function(t,e,r){if(!e)return{salt:null,key:null,iterations:0}
31;if(this.m_ofs_CashedKeys[e]&&this.m_ofs_CashedSalts[e]&&this.m_ofs_CashedSalts[e][t]&&this.m_ofs_CashedKeys[e][t])return{
32salt:this.m_ofs_CashedSalts[e][t],key:this.m_ofs_CashedKeys[e][t],iterations:this.m_ofs_CashedIterations[e][t]}
33;var s=this.ofs_decryptSaltKey(t,e,r);if(!s)return{salt:null,key:null,iterations:0}
34;for(var i=[],a=[],o=[],_=0;_<16;_++)i.push(s[_]);for(_=16;_<80;_++)a.push(s[_]);for(_=80;_<s.length;_++)o.push(s[_])
35;this.m_ofs_CashedSalts[e]||(this.m_ofs_CashedSalts[e]={}),this.m_ofs_CashedSalts[e][t]=i,
36this.m_ofs_CashedKeys[e]||(this.m_ofs_CashedKeys[e]={}),this.m_ofs_CashedKeys[e][t]=a
37;var h=n.GetLittleEndianIntegerFromByteArray(o,0,o.length)
38;return this.m_ofs_CashedIterations[e]||(this.m_ofs_CashedIterations[e]={}),this.m_ofs_CashedIterations[e][t]=h,{salt:i,key:a,
39iterations:h}},g.prototype.ofs_decryptSaltKey=function(e,r,s){try{if(!this.m_ofs_DBCached[r])return""
40;var i=this.m_ofs_DBCached[r][e];if(!i)return"";var a=CryptoJS.lib.CipherParams.create({ciphertext:CryptoJS.enc.Base64.parse(i)
41}),o=CryptoJS.enc.Latin1.parse(CryptoJS.enc.Latin1.stringify(CryptoJS.SHA256(s+s))),_=CryptoJS.enc.Hex.parse(y),h=CryptoJS.AES.decrypt(a,o,{
42iv:_}).toString(CryptoJS.enc.Utf8);return n.base64ToBytes(h)}catch(f){return t.SPECIAL_CASE,""}},
43g.prototype.RfTEST_OFS=function(s,n,o,_,h,f){selfObj=this;s.length,t.FUNC_INOUT;(new Date).getTime()
44;var m=new I(s),u=new Array(8);
44if(m.GetBytes(u,8),"onefile1"!=(u=i.bytesToString(u)))return t.SPECIAL_CASE,typeof _!=c&&_({
45Code:r.RfErr_BadData,Description:"Wrong file format : Could not read onefile1",sibErr:"LocalErr"},S),!1;var y=m.GetByte()
46;if(-1==y)return t.SPECIAL_CASE,typeof _!=c&&_({Code:r.RfErr_BadData,Description:"Wrong file format : Could not get flags",
47sibErr:"LocalErr"},S),!1;if((t.INFO,y&p)&&(t.INFO,!(C=new F(m)).OpenRead(!0)))return t.SPECIAL_CASE,typeof _!=c&&_({
48Code:r.RfErr_BadData,Description:"enIntegrityCheck failed!",sibErr:"LocalErr"},S),!1;if(y&l){if(t.INFO,
49""==n)return typeof _!=c&&_({Code:e.SibTErr_AuthRejected,Description:"Password is required",sibErr:"LocalErr"},S),!1;var C
50;(C=new R(C,n)).m_bRead=!0;var b=selfObj.ofs_GetData(h,f,n);return b.key&&b.salt&&(C.encr_SetDataSalt(b.salt,h,f),
51C.encr_SetDataKey(b.key,h,f),C.encr_SetDataIterations(b.iterations,h,f)),void C.OpenRead(!0,h,f,(function(){t.INFO,y&d&&t.INFO,
52t.INFO;for(var e=new Array,s=!1,n=0;!s;)-1==(n=C.GetByte())?s=!0:e.push(n);e.length,t.INFO,E(e,(function(e){t.INFO;try{
53JSON.parse(e)}catch(s){return e.substring(e.length-150),t.FUNC_INOUT,typeof _!=c&&_({Code:r.RfErr_BadData,
54Description:"Exception while JSON.Parse: "+s.toString()+".  End of data:  ..."+e.substring(e.length-50),sibErr:"LocalErr"},S),!1
55}(new Date).getTime();t.FUNC_INOUT,typeof o!=c&&o(a)}),(function(t){return-1==t?(typeof _!=c&&_({Code:r.RfErr_AuthRejected,
56Description:"Wrong master password",sibErr:"LocalErr"},S),!1):-2==t?(typeof _!=c&&_({Code:-2,
57Description:"Pako.unzip. Maximum call stack size exceeded",sibErr:"LocalErr"},S),!1):void 0}))}),(function(t){return _(t),!1}))}
58t.INFO};var S={};function E(e,r,s){try{t.FUNC_INOUT;var n=new Uint8Array(e);n.byteLength,t.INFO,t.INFO
59;var i=(new Date).getTime(),a=pako.ungzip(n);if(!a)return void s(-1);(new Date).getTime();if(t.INFO,
60FileReader.prototype.readAsText)h.BytesToString(a,(function(e){(new Date).getTime();t.FUNC_INOUT,r(e)}),(function(e){
61t.FUNC_INOUT,s(e)}));else{e=_.bytesToString(a),(new Date).getTime();t.FUNC_INOUT,r(e)}return}catch(o){t.INFO,
62"RangeError"==o.name?s(-2):s(-1)}}function I(t){this.m_buf_len=typeof t!=c?t.length:8192,this.buf=typeof t!=c?t:[],
63this.m_buf_ix=0,this.m_buffer_stream=null,this.m_bEOF=!1,this.m_bIsOpen=!1,this.m_bRead=!1,this.m_nCurLineIn=0,
64this.m_nCurPosIn=0,this.m_nUngetChar=-1}g.prototype.EncodeZipOFSBytes=function(r,s,n,a,o,_,h,f,m,u,y){try{var C=this
65;y||(y=function(t){}),y(1);r.length?r.length:r.byteLength;t.FUNC_INOUT;(new Date).getTime();function b(e,i,_){y(25);var p=e
66;if(i&&(p=new F(p)).OpenWrite(),_){var l=p=new R(p,a);p.encr_ClearCachedValues(s,n),p.OpenWrite(s,n,o,m,u)}t.INFO,y(30),t.INFO
67;var d=new Uint8Array(r);t.INFO;(new Date).getTime();var b=pako.gzip(d);(new Date).getTime(),t.INFO
68;r.length?r.length:r.byteLength;b.length,t.INFO,y(50),t.INFO,p.PutBytes(b,b.length),y(60),p.Close();var g=p.GetBuffer()
69;if(g.length,t.INFO,n){var S=l.encr_GetDataSalt(s,n),E=l.encr_GetDataKey(s,n),I=l.encr_GetDataIterations(s,n)
70;C.ofs_SetData(S,E,I,s,n,a)}(new Date).getTime();t.FUNC_INOUT,y(75),n?function(t){C.RfTEST_OFS(t,a,(function(e){
71typeof h!=c&&(y(99),h(t))}),(function(t){typeof f!=c&&f(t)}),s,n)}(g):h(g)}return void function(){y(5);var r=new I,s="onefile1"
72;if(s=i.stringToBytes(s),!r.PutBytes(s,8))return t.SPECIAL_CASE,void(typeof f!=c&&f({Code:e.SibTErr_LocalErr,
73Description:"Could not write onefile1",sibErr:"LocalErr"},S));t.INFO;var n=p|d;if(""!=a&&(n|=l),
74!r.PutByte(n))return t.SPECIAL_CASE,void(typeof f!=c&&f({Code:e.SibTErr_LocalErr,Description:"Could not write flags",
75sibErr:"LocalErr"},S));t.INFO;var o=0!=(n&p),_=0!=(n&l);t.INFO,y(20),b(r,o,_)}()}catch(g){return t.EXCEPTION,
76void(typeof f!=c&&f({Code:e.SibTErr_CatchedException,Description:g.toString(),sibErr:"LocalErr"}))}},
77g.prototype.DecodeUnZipOFSBytes=function(s,i,o,_,h,f,m,u){try{u||(u=function(t){}),selfObj=this,u(10);s.length,this.m_nId,
78t.FUNC_INOUT;(new Date).getTime();function y(e,s){E(e,(function(e){t.INFO,u(90);var r=0;if(s&&i&&o){
79var n=s.encr_GetDataSalt(i,o),h=s.encr_GetDataKey(i,o),m=s.encr_GetDataIterations(i,o);r=m,selfObj.ofs_SetData(n,h,m,i,o,_)}
80(new Date).getTime();t.FUNC_INOUT,u(99),typeof f!=c&&f(a,e,r)}),(function(t){return-1==t?(typeof m!=c&&m({
81Code:r.RfErr_AuthRejected,Description:"Wrong master password",sibErr:"LocalErr"}),!1):-2==t?(typeof m!=c&&m({Code:-2,
82Description:"Maximum call stack size exceeded",sibErr:"LocalErr"}),!1):void 0}))}return void function(){u(15)
83;var a=new I(s),f=new Array(8);a.GetBytes(f,8);var C=new Uint8Array([111,110,101,102,105,108,101,49])
84;
84if(!n.IsEqualArrays(f,C))return t.SPECIAL_CASE,typeof m!=c&&m({Code:r.RfErr_BadData,
85Description:"Wrong file format : Could not read onefile1",sibErr:"LocalErr"}),!1;var b=a.GetByte()
86;if(-1==b)return t.SPECIAL_CASE,typeof m!=c&&m({Code:r.RfErr_BadData,Description:"Wrong file format : Could not get flags",
87sibErr:"LocalErr"}),!1;if(t.INFO,b&p&&(t.INFO,!(g=new F(a)).OpenRead(h)))return t.SPECIAL_CASE,typeof m!=c&&m({
88Code:r.RfErr_BadData,Description:"enIntegrityCheck failed!",sibErr:"LocalErr"}),!1;if(0!=(b&l)){if(t.SPECIAL_CASE,
89""==_)return typeof m!=c&&m({Code:e.SibTErr_AuthRejected,Description:"Password is required",sibErr:"LocalErr"}),!1;var g
90;(g=new R(g,_)).m_bRead=!0;var S=g,E=selfObj.ofs_GetData(i,o,_);E.key&&E.salt&&(g.encr_SetDataSalt(E.salt,i,o),
91g.encr_SetDataKey(E.key,i,o),g.encr_SetDataIterations(E.iterations,i,o)),u(20),setTimeout((function(){!function(e,r,s){u(40),
92e.OpenRead(h,i,o,(function(){t.INFO,u(60),(new Date).getTime(),t.INFO
93;for(var n=new Array,i=!1,a=0;!i;)-1==(a=e.GetByte())?i=!0:n.push(a);(new Date).getTime(),t.INFO,u(75),s&d&&t.INFO,y(n,r)
94}),(function(t){return m(t),!1}))}(g,S,b)}),0)}else{t.INFO;(new Date).getTime();t.INFO
95;for(var B=new Array,O=!1,v=0;!O;)-1==(v=g.GetByte())?O=!0:B.push(v);(new Date).getTime();t.INFO,b&d&&t.INFO,y(B,!1)}}()
96}catch(C){return t.EXCEPTION,typeof m!=c&&m({Code:e.SibTErr_CatchedException,Description:C.toString(),sibErr:"LocalErr"}),!1}},
97I.prototype.GetBuffer=function(){return this.buf},I.prototype.FlushBuffer=function(){
98null==this.m_buffer_stream&&(this.m_buffer_stream=new Array)
99;for(var t=0;t<this.m_buf_ix;t++)this.m_buffer_stream.push(this.buf[t]);this.buf=new Array(this.m_buf_len),this.m_buf_ix=0},
100I.prototype.Close=function(){return null!=this.m_buffer_stream&&(this.FlushBuffer(),this.buf=this.m_buffer_stream,
101this.m_buffer_stream=null),this.buf.length=this.m_nCurPosIn,this.m_bEOF=!1,this.m_nUngetChar=-1,this.m_nCurPosIn=0,
102this.m_nCurLineIn=0,this.m_bIsOpen=!1,!0},I.prototype.PutBytes=function(t,e,r){var s=typeof r!=c?r:0;if(s+e>t.length)return!1
103;for(var n=0;n<e;n++)if(!this.PutByte(t[s+n]))return!1;return!0},I.prototype.PutByte=function(t){
104return this.m_buf_ix>=this.m_buf_len&&this.FlushBuffer(),this.buf[this.m_buf_ix++]=t,this.m_nCurPosIn++,!0},
105I.prototype.GetBytes=function(e,r,s){var n=typeof s!=c?s:0;if(n+r>e.length)return!1;for(var i=0;i<r;i++){var a=this.GetByte()
106;if(-1==a)return t.SPECIAL_CASE,!1;e[n+i]=a}return!0},I.prototype.GetByte=function(){var e
107;return this.m_nUngetChar>=0?(e=this.m_nUngetChar,this.m_nUngetChar=-1,this.m_nCurPosIn++,e):this.m_bEOF?(t.SPECIAL_CASE,
108-1):this.m_buf_ix>=this.m_buf_len?(this.m_bEOF=!0,this.m_nCurPosIn,t.SPECIAL_CASE,-1):(e=this.buf[this.m_buf_ix++],
109this.m_nCurPosIn++,10==e&&this.m_nCurLineIn++,e)};var B=0,O=1,v=2,T=3,N=100;function F(t,e){this.algorithm=-1,
110this.m_block_size=typeof e!=c?e:8192,this.m_hash_len=0,this.m_buf_len=0,this.m_buf_ix=0,this.m_Checkedbuffer=null,
111this.m_bIsOpen=!1,this.m_bEOF=!1,this.m_nUngetChar=-1,this.m_nCurPosIn=0,this.m_nCurLineIn=0,this.m_bRead=!1,this.m_src=t,
112this.m_bIsByteArray=!1}F.prototype.Clone=function(t){t&&(this.m_src=new F,this.m_src.m_bEOF=t.m_bEOF,
113this.m_src.m_bIsOpen=t.m_bIsOpen,this.m_src.m_nUngetChar=t.m_nUngetChar,this.m_src.m_nCurPosIn=t.m_nCurPosIn,
114this.m_src.m_nCurLineIn=t.m_nCurLineIn,this.m_src.m_buf_ix=t.m_buf_ix,this.m_src.m_buf_len=t.m_buf_len,this.m_src.buf=t.buf)},
115F.prototype.InitAlgorithm=function(t){switch(this.m_hash_len=0,t){case B:this.m_hash_len=4;break;case O:this.m_hash_len=16;break
116;case v:case T:break;default:return!1}return!0},F.prototype.Base_Init=function(){this.m_bEOF=!1,this.m_nUngetChar=-1,
117this.m_nCurPosIn=0,this.m_nCurLineIn=0,this.m_bIsOpen=!1},F.prototype.Base_OpenWrite=function(){return this.Base_Init(),
118this.m_bIsOpen=!0,this.m_bRead=!1,!0},F.prototype.Base_OpenRead=function(){return this.Base_Init(),this.m_bIsOpen=!0,
119this.m_bRead=!0,!0},F.prototype.OpenRead=function(t){return this.Base_OpenRead(),this.m_bIsByteArray=t,this.m_buf_len=0,
120this.m_buf_ix=0,
121this.m_Checkedbuffer=[],this.algorithm=this.m_src.GetByte(),!(this.algorithm>=N)&&this.InitAlgorithm(this.algorithm)},
122F.prototype.GetByte=function(){var t;return this.m_nUngetChar>=0?(t=this.m_nUngetChar,this.m_nUngetChar=-1,this.m_nCurPosIn++,
123t):this.m_bEOF||this.m_buf_ix>=this.m_buf_len&&!this.ReadBuffer()?-1:(t=this.m_Checkedbuffer[this.m_buf_ix++],
124this.m_nCurPosIn++,t)},F.prototype.GetBytes=function(t,e,r){var s=typeof r!=c?r:0;if(s+e>t.length)return!1;for(var n=0;n<e;n++){
125t[s+n];var i=this.GetByte();if(-1==i)return!1;t[s+n]=i}return!0},F.prototype.OpenWrite=function(){return this.Base_OpenWrite(),
126this.algorithm=O,
127this.m_buf_len=0,this.m_buf_ix=0,this.m_Checkedbuffer=[],!!this.InitAlgorithm(this.algorithm)&&(!!this.m_src.PutByte(this.algorithm)&&(this.m_bIsOpen=!0,
128!0))},F.prototype.PutByte=function(t){return this.m_Checkedbuffer[this.m_buf_ix++]=t,this.m_nCurPosIn++,
129!(this.m_buf_ix>=this.m_block_size&&!this.WriteBuffer())},F.prototype.PutBytes=function(t,e,r){var s=typeof r!=c?r:0
130;if(s+e>t.length)return!1;for(var n=0;n<e;n++)if(!this.PutByte(t[s+n]))return!1;return!0},F.prototype.ReadBuffer=function(){
131var e=new Array(4);if(!this.m_src.GetBytes(e,4))return t.FUNC_INOUT,!1
132;if(!this.m_bIsByteArray)for(var r=0;r<e.length;r++)e[r]=255&e[r].charCodeAt(0)
133;if(this.m_buf_len=n.GetLittleEndianIntegerFromByteArray(e,0,e.length),0==this.m_buf_len)return this.m_bEOF=!0,t.FUNC_INOUT,!1
134;var s=new Array(this.m_hash_len);if(!this.m_src.GetBytes(s,this.m_hash_len))return t.FUNC_INOUT,!1
135;var i=new Array(this.m_hash_len);for(r=0;r<s.length;r++)i[r]=this.m_bIsByteArray?s[r]:255&s[r].charCodeAt(0)
136;return this.m_Checkedbuffer=new Array(this.m_buf_len),
137!!this.m_src.GetBytes(this.m_Checkedbuffer,this.m_buf_len)&&(n.IsEqualArrays(i,md5.array(this.m_Checkedbuffer))?(this.m_buf_ix=0,
138!0):(t.FUNC_INOUT,!1))},F.prototype.WriteBuffer=function(){var t=n.GetLittleEndianByteArrayFromInteger(this.m_buf_ix,4)
139;if(!this.m_src.PutBytes(t,t.length))return!1;var e=new Array(this.m_buf_ix)
140;n.BlockCopy(this.m_Checkedbuffer,0,e,0,this.m_buf_ix);var r=md5.array(e)
141;return!!this.m_src.PutBytes(r,this.m_hash_len)&&(!!this.m_src.PutBytes(this.m_Checkedbuffer,this.m_buf_ix)&&(this.m_buf_ix=0,
142!0))},F.prototype.Close=function(){if(!this.m_bIsOpen)return!0;
142if(!this.m_bRead){if(!this.WriteBuffer())return!1
143;if(!this.m_src.PutBytes([0,0,0,0],4))return!1}return!!this.m_src.Close()&&(this.m_buf_len=0,this.m_buf_ix=0,
144this.m_Checkedbuffer=null,!0)},F.prototype.GetBuffer=function(){return this.m_src.GetBuffer()};var A=0,D=1,P=2,L=3,x=4
145;function R(t,e){this.m_encrPass=typeof e!=c?e:"",this.m_ctx=null,this.m_Encryptedbuffer=[],this.m_buf_len=0,this.m_buf_ix=0,
146this.m_bLastBlock=!1,this.m_nCurPosIn=0,this.m_bLastBlockLoaded=!1,this.m_bRead=!1,this.m_bIsOpen=!1,this.m_bEOF=!1,
147this.m_nUngetChar=-1,this.m_nCurPosIn=0,this.m_nCurLineIn=0,this.m_bNoPadding=!1,this.m_src=t,this.m_salt_length=16,
148this.m_max_leading_garbage_length=32,this.m_out_buf_len=512,this.m_read_buf_len=512,this.m_bIsByteArray=!1,
149this.m_encr_CashedSalts={},this.m_encr_CashedKeys={},this.m_encr_CashedIterations={}}
150R.prototype.encr_SetDataIterations=function(t,e,r){this.m_encr_CashedIterations[r]||(this.m_encr_CashedIterations[r]={}),
151this.m_encr_CashedIterations[r][e]=t},R.prototype.encr_GetDataIterations=function(t,e){
152return this.m_encr_CashedIterations[e]?this.m_encr_CashedIterations[e][t]:0},R.prototype.encr_SetDataSalt=function(t,e,r){
153this.m_encr_CashedSalts[r]||(this.m_encr_CashedSalts[r]={}),this.m_encr_CashedSalts[r][e]=t},
154R.prototype.encr_GetDataSalt=function(t,e){return this.m_encr_CashedSalts[e]?this.m_encr_CashedSalts[e][t]:[]},
155R.prototype.encr_SetDataKey=function(t,e,r){this.m_encr_CashedKeys[r]||(this.m_encr_CashedKeys[r]={}),
156this.m_encr_CashedKeys[r][e]=t},R.prototype.encr_GetDataKey=function(t,e){
157return this.m_encr_CashedKeys[e]?this.m_encr_CashedKeys[e][t]:null},R.prototype.OpenWrite=function(e,r,a,o,_){try{
158_=void 0!==_&&_,o=void 0===o?P:o;var h=this;h.Base_OpenWrite();var c="gsencst1";c=i.stringToBytes(c),h.m_src.PutBytes(c,8),
159h.m_src.m_Checkedbuffer.length,h.m_src.m_Checkedbuffer.join(),t.INFO;var m=_?1:0;h.m_src.PutByte(m),t.INFO,h.m_src.PutByte(o),
160t.INFO;var u=a||4096,y=n.GetLittleEndianByteArrayFromInteger(u,4);t.INFO,h.m_src.PutBytes(y,y.length),
161h.m_src.m_Checkedbuffer.length,h.m_src.m_Checkedbuffer.join(),t.INFO,h.m_src.PutByte(h.m_salt_length),h.m_salt_length,t.INFO
162;var p=n.randomBytes(h.m_salt_length);r&&(h.encr_SetDataSalt(p,e,r),h.encr_SetDataIterations(u,e,r)),
163h.m_src.PutBytes(p,h.m_salt_length),_&&(h.m_src.PutByte(C),t.INFO),h.m_src.m_Checkedbuffer.length,
164h.m_src.m_Checkedbuffer.join(),t.INFO;var l=1;switch(o){case P:l=2;break;case L:case x:l=3}
165var d=new RfapiJS.Pbkdf2(l,p,h.m_encrPass,u),b=new Array(64);b=d.GetBytes(64),r&&h.encr_SetDataKey(b,e,r),h.m_buf_len=0,
166h.m_buf_ix=0,h.m_bLastBlock=!1,h.m_bIsOpen=!0;var g=new Array(32),S=new Array(16);n.BlockCopy(b,0,g,0,32),
167n.BlockCopy(b,32,S,0,16);var E=CryptoJS.enc.Hex.parse(n.bytesToHex(g)),I=CryptoJS.enc.Hex.parse(n.bytesToHex(S));h.keyWords=E,
168h.ivWords=I;var B={};B.iv=I,B.mode=CryptoJS.mode.CBC,B.padding=_?CryptoJS.pad.NoPadding:CryptoJS.pad.Pkcs7,h.m_bNoPadding=!!_,
169h.m_ctx=CryptoJS.algo.AES.createEncryptor(E,B)
170;for(var O=0==h.m_max_leading_garbage_length?0:h.m_max_leading_garbage_length<=32?n.random()%h.m_max_leading_garbage_length:n.random()%(h.m_max_leading_garbage_length-32)+32,v=170,T=0;T<O;T++){
171var N=n.longToSingleByte(n.random());if(0==n.longToSingleByte(N^v)&&(N=n.longToSingleByte(n.random()),
1720==n.longToSingleByte(N^v)&&N++),!h.PutByte(N))return!1;v=n.longToSingleByte(v^N)}return h.PutByte(v),t.INFO,
173h.m_Encryptedbuffer.join(),t.INFO,!0}catch(F){s("EXCEPTION in EncryptedStream.OpenWrite"+F.toString(),f)}},
174R.prototype.OpenRead=function(r,i,a,o,_){try{var h=this;function m(r,m){if(t.INFO,100==r){try{a&&h.encr_SetDataKey(m,i,a)
175;var u=new Array(32),y=new Array(16);n.BlockCopy(m,0,u,0,32),n.BlockCopy(m,32,y,0,16)
176;var p=CryptoJS.enc.Hex.parse(n.bytesToHex(u)),l=CryptoJS.enc.Hex.parse(n.bytesToHex(y));h.keyWords=p,h.ivWords=l}catch(O){
177return s("EXCEPTION in EncryptedStream.OpenRead.PBkdf_Callback[1] "+O.toString(),f),typeof _!=c&&_({Code:e.SibTErr_LocalErr,
178Description:"EXCEPTION in EncryptedStream.OpenRead.PBkdf_Callback[1]:"+O.toString()}),!1}try{var d={};d.iv=l,
179d.mode=CryptoJS.mode.CBC,d.padding=CryptoJS.pad.Pkcs7,0!=(B&C)&&(d.padding=CryptoJS.pad.NoPadding,h.m_bNoPadding=!0),
180h.m_ctx=CryptoJS.algo.AES.createDecryptor(p,d),h.m_buf_len=0,h.m_buf_ix=0,h.m_bLastBlock=!1,t.INFO;var b=1048576,g=170,S=0
181}catch(O){return s("EXCEPTION in EncryptedStream.OpenRead.PBkdf_Callback[2] "+O.toString(),f),typeof _!=c&&_({
182Code:e.SibTErr_LocalErr,Description:"EXCEPTION in EncryptedStream.OpenRead.PBkdf_Callback[2]:"+O.toString()}),!1}var E=[]
183;for(S=0;S<b;S++){var I=h.GetByte();if(-1==I)return t.INFO,typeof _!=c&&_({Code:e.SibTErr_LocalErr,
184Description:"--- NO - stream too short!"}),!1;if(E.push(I),0==(I^g)){t.INFO;break}if(S==b-1)return t.INFO,typeof _!=c&&_({
185Code:e.SibTErr_LocalErr,Description:"garbage_bytes_read RETURN FA
185LSE!"}),!1;g^=I}return E.length,E.join(),t.INFO,o(),!0}}t.INFO,
186h.Base_OpenRead(),h.m_bIsByteArray=r;for(var u=new Array(8),y=0;y<8;y++)u[y]=h.m_src.GetByte()
187;var p=new Uint8Array([103,115,101,110,99,115,116,49]);if(!n.IsEqualArrays(u,p))return typeof _!=c&&_({Code:e.SibTErr_LocalErr,
188Description:"Wrong file format. Bad stream header != gsencst1"}),!1;var l=h.m_src.GetByte();if(-1==l)return typeof _!=c&&_({
189Code:e.SibTErr_LocalErr,Description:"Wrong file format. Bad stream header. ext_header_len"}),!1;var d=h.m_src.GetByte()
190;if(-1==d)return typeof _!=c&&_({Code:e.SibTErr_LocalErr,Description:"Wrong file format. Bad stream header. kdf_algorithm"}),!1
191;var b=d;if(b!=P&&b!=L)return typeof _!=c&&_({Code:e.SibTErr_LocalErr,Description:"Unknown ecryption method"}),!1
192;var g=new Array(4);if(!h.m_src.GetBytes(g,4))return typeof _!=c&&_({Code:e.SibTErr_LocalErr,
193Description:"Cannot get hash rounds"}),!1;var S=n.GetLittleEndianIntegerFromByteArray(g,0,g.length)
194;if(0==S||S>8388608)return typeof _!=c&&_({Code:e.SibTErr_LocalErr,Description:"Wrong ecryption parameters: hash rounds"}),!1
195;var E=h.m_src.GetByte();if(-1==E)return typeof _!=c&&_({Code:e.SibTErr_LocalErr,
196Description:"Wrong ecryption parameters: Cannot get salt length."}),!1;var I=new Array(E)
197;if(!h.m_src.GetBytes(I,E))return typeof _!=c&&_({Code:e.SibTErr_LocalErr,
198Description:"Wrong ecryption parameters: Cannot get salt bytes."}),!1;var B=0,O=new Array(l)
199;
199if(!h.m_src.GetBytes(O,l))return typeof _!=c&&_({Code:e.SibTErr_LocalErr,
200Description:"Wrong ecryption parameters: Cannot get reserved bytes."}),!1;if(B=O[0],b==A||b==D)return typeof _!=c&&_({
201Code:e.SibTErr_LocalErr,Description:"Wrong decryption parameters: Unsupported algorithm SHA1"}),!1;t.INFO;try{
202if(a)var v=h.encr_GetDataSalt(i,a),T=h.encr_GetDataKey(i,a),N=h.encr_GetDataIterations(i,a);var F=!1
203;N==S&&v&&(F=n.compareSets(v,I))}catch(k){return s("EXCEPTION in EncryptedStream.OpenRead[6] "+k.toString(),f),typeof _!=c&&_({
204Code:e.SibTErr_LocalErr,Description:"EXCEPTION in EncryptedStream.OpenRead[6]:"+k.toString()}),!1}try{if(F&&T)t.INFO,
205m(100,T);else{a&&(h.encr_SetDataSalt(I,i,a),h.encr_SetDataIterations(S,i,a));var R=1;switch(b){case P:R=2;break;case L:case x:
206R=3}new RfapiJS.Pbkdf2(R,I,h.m_encrPass,S).GetBytes(64,m,o,_)}}catch(k){
207return s("EXCEPTION in EncryptedStream.OpenRead[7] "+k.toString(),f),typeof _!=c&&_({Code:e.SibTErr_LocalErr,
208Description:"EXCEPTION in EncryptedStream.OpenRead[7]:"+k.toString()}),!1}return}catch(k){
209s("EXCEPTION in EncryptedStream.OpenRead"+k.toString(),f),typeof _!=c&&_({Code:e.SibTErr_LocalErr,
210Description:"EXCEPTION in EncryptedStream.OpenRead:"+k.toString()})}},R.prototype.FillReadBuf=function(){
211if(this.m_Encryptedbuffer=new Array(this.m_read_buf_len),!this.m_bLastBlock)for(var e,r=0;r<this.m_read_buf_len;r++){
212if(-1==(e=this.m_src.GetByte())){this.m_bLastBlock=!0,this.m_buf_len=r;break}this.m_Encryptedbuffer[r]=e}if(this.m_bLastBlock){
213this.m_bLastBlockLoaded=!0;for(var s=0;typeof this.m_Encryptedbuffer[s]!=c;)s++;this.m_Encryptedbuffer.length=s
214;var i=CryptoJS.enc.u8array.parse(this.m_Encryptedbuffer),a=this.m_ctx.process(i),o=this.m_ctx.finalize();if(t.INFO,
215o.sigBytes<0)var _=CryptoJS.enc.Base64.stringify(a);else{o=a.concat(o);_=CryptoJS.enc.Base64.stringify(o)}h=n.base64ToBytes(_)
216;this.m_buf_len=h.length,this.m_Encryptedbuffer.length,this.m_Encryptedbuffer.join(),h.join(),t.INFO,this.m_Encryptedbuffer=h
217}else{var h
218;if(!(h=CryptoJS.enc.u8array.stringify(this.m_ctx.process(CryptoJS.enc.u8array.parse(this.m_Encryptedbuffer)))).length)return void this.FillReadBuf()
219;this.m_buf_len=h.length,this.m_Encryptedbuffer=[];for(var f=0;f<h.length;f++)this.m_Encryptedbuffer.push(h[f])}},
220R.prototype.Base_OpenWrite=function(){return this.m_bRead=!1,this.m_bEOF=!1,this.m_nUngetChar=-1,this.m_nCurPosIn=0,
221this.m_nCurLineIn=0,this.m_bIsOpen=!0,!0},R.prototype.Base_OpenRead=function(){return this.m_bRead=!0,this.m_bEOF=!1,
222this.m_nUngetChar=-1,this.m_nCurPosIn=0,this.m_nCurLineIn=0,this.m_bIsOpen=!0,!0},R.prototype.TryGetByteFromReadBuf=function(){
223if(this.m_buf_len>0&&this.m_buf_ix<this.m_buf_len){var e=this.m_Encryptedbuffer[this.m_buf_ix++];return this.m_nCurPosIn++,e}
224return this.m_bLastBlock?(t.INFO,-1):(this.m_buf_ix=0,-1)},R.prototype.GetByte=function(){var t=this.TryGetByteFromReadBuf()
225;if(-1==t){if(this.m_bLastBlockLoaded)return-1;try{this.FillReadBuf()}catch(e){return-1}return this.TryGetByteFromReadBuf()}
226return t},R.prototype.PutByte=function(t){if(this.m_buf_ix<this.m_out_buf_len)return this.m_Encryptedbuffer[this.m_buf_ix++]=t,
227!0
228;for(var e=CryptoJS.enc.u8array.stringify(this.m_ctx.process(CryptoJS.enc.u8array.parse(this.m_Encryptedbuffer))),r=e.length,s=[],n=0;n<e.length;n++)s.push(e[n])
229;return!!this.m_src.PutBytes(s,r)&&(this.m_buf_ix=0,this.m_Encryptedbuffer.length=0,this.m_Encryptedbuffer[this.m_buf_ix++]=t,
230!0)},R.prototype.PutBytes=function(t,e,r){var s=typeof r!=c?r:0;if(s+e>t.length)return!1
231;for(var n=0;n<e;n++)if(!this.PutByte(t[s+n]))return!1;return!0},R.prototype.GetBuffer=function(){return this.m_src.GetBuffer()
232},R.prototype.Close=function(){if(t.INFO,!this.m_bIsOpen)return!0;if(!this.m_bRead){if(this.m_bNoPadding){
233var e=0==this.m_max_leading_garbage_length?0:this.m_max_leading_garbage_length<=32?n.random()%this.m_max_leading_garbage_length:n.random()%(this.m_max_leading_garbage_length-32)+32,r=16*parseInt((this.m_buf_ix+e+16-1)/16)-this.m_buf_ix,s=n.randomBytes(r)
234;s.join(),t.INFO;for(var i=0;i<s.length;i++)this.m_Encryptedbuffer.push(s[i]),this.m_buf_ix++}this.m_Encryptedbuffer.join(),
235t.INFO;var a=CryptoJS.enc.u8array.parse(this.m_Encryptedbuffer),o=this.m_ctx.process(a),_=this.m_ctx.finalize()
236;CryptoJS.enc.Base64.stringify(o),CryptoJS.enc.Base64.stringify(_);o.toString(),o.sigBytes,_.sigBytes,t.INFO
237;var h=o.concat(_),f=CryptoJS.enc.u8array.stringify(h),c=[];for(i=0;i<f.length;i++)c.push(f[i])
238;if(!this.m_src.PutBytes(c,c.length))return t.INFO,!1}return this.m_ctx=null,this.m_src.Close()?(this.m_buf_len=0,
239this.m_buf_ix=0,this.m_Encryptedbuffer=[],t.INFO,!0):(t.INFO,!1)},R.prototype.encr_ClearCachedValues=function(t,e){
240e&&(this.m_encr_CashedIterations[e]||(this.m_encr_CashedIterations[e]={}),this.m_encr_CashedIterations[e][t]=0,
241this.m_encr_CashedSalts[e]||(this.m_encr_CashedSalts[e]={}),this.m_encr_CashedSalts[e][t]=null,
242this.m_encr_CashedKeys[e]||(this.m_encr_CashedKeys[e]={}),this.m_encr_CashedKeys[e][t]=null)},RfapiJS.CRfOneFileSys=g
243}).apply(RfapiJS);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.