UNPKG

evelodb

Version:

An awesome local database management system with nodejs. Made by Evelocore. With B-tree Operations.

1 lines 2.81 kB
const _0x4cb4cc=_0x1c55;function _0x1c55(_0x3fca99,_0x135a41){const _0x3ae82a=_0x3ae8();return _0x1c55=function(_0x1c55df,_0x5f2559){_0x1c55df=_0x1c55df-0x185;let _0x5c7801=_0x3ae82a[_0x1c55df];return _0x5c7801;},_0x1c55(_0x3fca99,_0x135a41);}(function(_0xeea01b,_0x2e4bbf){const _0x29fa70=_0x1c55,_0xb33ceb=_0xeea01b();while(!![]){try{const _0x3d0cb4=-parseInt(_0x29fa70(0x185))/0x1+-parseInt(_0x29fa70(0x191))/0x2*(-parseInt(_0x29fa70(0x18e))/0x3)+-parseInt(_0x29fa70(0x193))/0x4+-parseInt(_0x29fa70(0x19c))/0x5+-parseInt(_0x29fa70(0x197))/0x6+parseInt(_0x29fa70(0x18d))/0x7*(parseInt(_0x29fa70(0x190))/0x8)+-parseInt(_0x29fa70(0x196))/0x9*(-parseInt(_0x29fa70(0x19a))/0xa);if(_0x3d0cb4===_0x2e4bbf)break;else _0xb33ceb['push'](_0xb33ceb['shift']());}catch(_0x4efb4d){_0xb33ceb['push'](_0xb33ceb['shift']());}}}(_0x3ae8,0x45a22));const crypto=require(_0x4cb4cc(0x188));function encrypt(_0x64cf18,_0x13c5ca=_0x4cb4cc(0x187),_0x30093e){const _0x5c22f6=_0x4cb4cc,_0x5e13a0=crypto['randomBytes'](0x10),_0x8e629f=crypto[_0x5c22f6(0x19e)](_0x13c5ca,Buffer[_0x5c22f6(0x192)](_0x30093e,_0x5c22f6(0x19d)),_0x5e13a0);let _0x5623bc=_0x8e629f[_0x5c22f6(0x18a)](JSON[_0x5c22f6(0x18c)](_0x64cf18));_0x5623bc=Buffer['concat']([_0x5623bc,_0x8e629f[_0x5c22f6(0x199)]()]);const _0x2deeb6=_0x13c5ca[_0x5c22f6(0x195)](_0x5c22f6(0x194))?_0x8e629f[_0x5c22f6(0x198)]()[_0x5c22f6(0x186)](_0x5c22f6(0x19d)):'';return _0x5e13a0['toString']('hex')+':'+_0x5623bc[_0x5c22f6(0x186)](_0x5c22f6(0x19d))+(_0x2deeb6?':'+_0x2deeb6:'');}function decrypt(_0xc0ccf1,_0xf66404=_0x4cb4cc(0x187),_0x11ac8a){const _0x1c684a=_0x4cb4cc,_0x50696e=_0xc0ccf1[_0x1c684a(0x18f)](':'),_0x9289af=Buffer['from'](_0x50696e[0x0],'hex'),_0x57e3b9=Buffer[_0x1c684a(0x192)](_0x50696e[0x1],'hex'),_0x538130=crypto['createDecipheriv'](_0xf66404,Buffer[_0x1c684a(0x192)](_0x11ac8a,_0x1c684a(0x19d)),_0x9289af);if(_0xf66404[_0x1c684a(0x195)](_0x1c684a(0x194))){const _0x12bddf=Buffer['from'](_0x50696e[0x2],'hex');_0x538130[_0x1c684a(0x189)](_0x12bddf);}let _0x1f5f35=_0x538130[_0x1c684a(0x18a)](_0x57e3b9);return _0x1f5f35=Buffer[_0x1c684a(0x18b)]([_0x1f5f35,_0x538130[_0x1c684a(0x199)]()]),JSON[_0x1c684a(0x19b)](_0x1f5f35[_0x1c684a(0x186)]());}function _0x3ae8(){const _0x38f910=['setAuthTag','update','concat','stringify','5551uobAyx','72147WkFaRw','split','1096uBKREq','10qUqdXy','from','1967812TTMNwy','gcm','includes','12677517MXVoZh','1031754vpzeCO','getAuthTag','final','10mktKcb','parse','1253010Lgxkdc','hex','createCipheriv','437767sIYTUN','toString','aes-256-cbc','crypto'];_0x3ae8=function(){return _0x38f910;};return _0x3ae8();}function generateKey(_0x214782=0x20){const _0x2a6b08=_0x4cb4cc;return crypto['randomBytes'](_0x214782/0x2)[_0x2a6b08(0x186)](_0x2a6b08(0x19d));}module['exports']={'encrypt':encrypt,'decrypt':decrypt,'generateKey':generateKey};