Загрузка...

Хеш пароля и разхеш пароля

Тема в разделе Node.js создана пользователем Kinf 25 ноя 2024. 295 просмотров

  1. Kinf
    Kinf Автор темы 25 ноя 2024 4 14 ноя 2024
    гавно код, работает

    вводите пароль он дает хеш в консоль вызываете функцию keys() вводите хеш получаете пароль

    хеши всегда разные(рандом)




    JS
    function hesh(){
    const jst = ['X','E','G','-','A','y','$','B', 'L', 'Q','#'];
    const hesh66 = Math.floor(Math.random() * 9);const hesh01 = Math.floor(Math.random() * 9);
    const hesh11 = Math.floor(Math.random() * jst.length);const hesh12 = Math.floor(Math.random() * jst.length);
    const hesh13 = Math.floor(Math.random() * jst.length);const hesh14 = Math.floor(Math.random() * jst.length);
    const hesh15 = Math.floor(Math.random() * jst.length);const hesh16 = Math.floor(Math.random() * jst.length);
    const hesh02 = Math.floor(Math.random() * 9);const hesh03 = Math.floor(Math.random() * 9);const hesh04 = Math.floor(Math.random() * 9);const hesh05 = Math.floor(Math.random() * 9);
    const hesh06 = Math.floor(Math.random() * 9);const hesh07 = Math.floor(Math.random() * 9);const hesh08 = Math.floor(Math.random() * 9);
    this.hesh99 = jst[hesh11] + jst[hesh13] + hesh66 + jst[hesh16] + hesh66 + jst[hesh15] + hesh01 + hesh04 + hesh05 + hesh06 + jst[hesh12] + hesh03 + jst[hesh11] + hesh07 + hesh08;
    var pawr = prompt('ваш password'); this.OPW = pawr; pawr = this.hesh99;console.log(`ваш хеш: ${pawr}`);
    alert(`ваш хеш: ${pawr}`);
    }
    const opwe = new hesh();
    function keys(){
    var OW2 = prompt('you hesh:');
    if (OW2 == opwe.hesh99){
    alert(`you pass: ${opwe.OPW}`);console.log(`you pass: ${opwe.OPW}`);
    }
    }
     
  2. WickedFace
    WickedFace 25 ноя 2024 83 24 окт 2022
    один вопрос нахуя
     
    1. Kinf Автор темы
  3. Wallet
    Wallet 26 ноя 2024 цааоооо 14 329 2 июн 2017
    crypto js brow
     
Загрузка...
Top