Skip to content

字符串安全传输,客户端加密,服务器端解密

Notifications You must be signed in to change notification settings

zigufeiyu/softdog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

softdog

npm package

build status devDependency npm version npm

字符串混淆处理

  • 加强密码等敏感数据传输安全性
  • 客户端加密,服务器端解密
var softdog = require("softdog");

var input = {
    type: "password", 
    value: "abc731"
}

// 客户端加密
var client2serverStr = softdog.encrypt(input.value);
console.log(client2serverStr);

// 服务器端解密
var rawStr = softdog.decrypt(client2serverStr);
console.log(rawStr);

// 结果校验
console.log(rawStr === input.value);
  • 特别提示

    加密|解密方法参数如果数据类型非字符串或者为空字符串,返回结果均为空字符串

About

字符串安全传输,客户端加密,服务器端解密

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published