Blame view

apps/passport/models/aes-pwd.js 439 Bytes
王水玲 authored
1
/**
王水玲 authored
2
 * 登录注册密码加密,uid加密
王水玲 authored
3 4 5 6 7 8
 * @author: wsl<shuiling.wang@yoho.cn>
 * @date: 2016/07/07
 */

'use strict';
王水玲 authored
9
const crypto = global.yoho.crypto;
王水玲 authored
10 11

/**
王水玲 authored
12
 * 密码加密
王水玲 authored
13 14
 **/
const aesPwd = (pwd) => {
王水玲 authored
15
    return crypto.encryption('yoho9646yoho9646', pwd);
王水玲 authored
16 17 18 19 20 21
};

/**
 * uid加密
 **/
const encryptionUid = (uid) => {
王水玲 authored
22
    return crypto.encryption('yoho9646abcdefgh', uid + '');
王水玲 authored
23 24 25
};

module.exports = {
王水玲 authored
26
    aesPwd,
王水玲 authored
27
    encryptionUid
王水玲 authored
28
};