aes-pwd.js 439 Bytes
/**
 * 登录注册密码加密,uid加密
 * @author: wsl<shuiling.wang@yoho.cn>
 * @date: 2016/07/07
 */

'use strict';

const crypto = global.yoho.crypto;

/**
 * 密码加密
 **/
const aesPwd = (pwd) => {
    return crypto.encryption('yoho9646yoho9646', pwd);
};

/**
 * uid加密
 **/
const encryptionUid = (uid) => {
    return crypto.encryption('yoho9646abcdefgh', uid + '');
};

module.exports = {
    aesPwd,
    encryptionUid
};