UNPKG

bcryption

Version:

Bcryption is a simple digital encription algorithm, is stable for javascript

21 lines (14 loc) 1.98 kB
/* const bcryption = require('bcryption') bcryption.hash( "hailemelekot12345", // password "Secret" //Secret from your .env variable ).then((res) => { console.log(res) //set it to database }) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can contact me at:- Email: Hailemelekotmelakie1991@gmail.com ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ const _0x45b7a5 = _0xee9f; function _0xee9f(_0x5d9f4b, _0x2f9b64) { const _0x4fa888 = _0x4fa8(); return _0xee9f = function (_0xee9fca, _0x52dbb3) { _0xee9fca = _0xee9fca - 0x17e; let _0x16487c = _0x4fa888[_0xee9fca]; return _0x16487c; }, _0xee9f(_0x5d9f4b, _0x2f9b64); } (function (_0x4c5c0f, _0x4ba61b) { const _0x129faf = _0xee9f, _0xbeb398 = _0x4c5c0f(); while (!![]) { try { const _0x30dbf0 = -parseInt(_0x129faf(0x187)) / 0x1 + parseInt(_0x129faf(0x18a)) / 0x2 * (parseInt(_0x129faf(0x183)) / 0x3) + parseInt(_0x129faf(0x184)) / 0x4 * (-parseInt(_0x129faf(0x186)) / 0x5) + parseInt(_0x129faf(0x185)) / 0x6 + -parseInt(_0x129faf(0x180)) / 0x7 + -parseInt(_0x129faf(0x181)) / 0x8 * (parseInt(_0x129faf(0x188)) / 0x9) + parseInt(_0x129faf(0x17f)) / 0xa; if (_0x30dbf0 === _0x4ba61b) break; else _0xbeb398['push'](_0xbeb398['shift']()); } catch (_0x3bfc59) { _0xbeb398['push'](_0xbeb398['shift']()); } } }(_0x4fa8, 0x96343)); const enc = require('./enc'); function _0x4fa8() { const _0x254a85 = ['324978QYMsVh', '1251fBnXYg', 'Incorrect', '52688nHrmij', 'exports', '9801820tDHTGM', '726607GSmJxL', '27736FHfKru', 'then', '99LTBGQz', '4hIBQvZ', '1763556zbQvAJ', '3087665mUuQVm']; _0x4fa8 = function () { return _0x254a85; }; return _0x4fa8(); } async function hash(_0x531755, _0x26f856) { return new Promise(async (_0x3f6ba8, _0x15f714) => { const _0x14b534 = _0xee9f; await enc(_0x531755, _0x26f856)[_0x14b534(0x182)](async _0x3496f8 => { const _0x3b4bf0 = _0x14b534; _0x3496f8 ? _0x3f6ba8(_0x3496f8) : _0x3f6ba8(_0x3b4bf0(0x189)); }); }); } module[_0x45b7a5(0x17e)] = hash;