Skip to content
  • This project
    • Loading...
  • Sign in

dev / pingan-life-index-pro

Go to a project
Toggle navigation
Toggle navigation pinning
  • Projects
  • Groups
  • Snippets
  • Help
  • Project
  • Activity
  • Repository
  • Pipelines
  • Graphs
  • Issues 0
  • Merge Requests 0
  • Wiki
  • Network
  • Create a new issue
  • Builds
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Network
  • Compare
  • Branches
  • Tags
Switch branch/tag
  • pingan-life-index-pro
  • src
  • utils
  • encrypt.js
  • joe's avatar
    部分BUG修正 · b863da3d
    b863da3d
    joe committed 2020-01-04 15:31:22 +0800
encrypt.js 374 Bytes
Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19




function passwordEncrypt(rawPwd) {
    let PK = window.global.PK;
    let E = window.global.E;
    let rsa = new RSAKey();
    // console.log("rsa === ", rsa);
    rsa.setPublic(PK, E);
    let res = rsa.encrypt(rawPwd);
    // console.log("res === ", res);
    if (res == null) return rawPwd;
    return res;
}

module.exports = {
    passwordEncrypt: passwordEncrypt
}