//Base64编码
var base64Encode = function(value){
    return new Buffer(value).toString('base64');
}
exports.base64Encode =base64Encode;

//Base64解码
var base64Decode = function(value){
    return new Buffer(value, 'base64').toString();
}
exports.base64Decode = base64Decode;

//GBK转UTF8
function gbkToUtf8(str) {
    return unescape(str.replace(/&#x/g, '%u').replace(/;/g, ''))
}
exports.gbkToUtf8 = gbkToUtf8;