MCPcopy Index your code
hub / github.com/YMFE/yapi / aseEncode

Function aseEncode

server/utils/token.js:10–21  ·  view source on GitHub ↗
(data, password)

Source from the content-addressed store, hash-verified

8
9// 创建加密算法
10const aseEncode = function(data, password) {
11
12 // 如下方法使用指定的算法与密码来创建cipher对象
13 const cipher = crypto.createCipher('aes192', password);
14
15 // 使用该对象的update方法来指定需要被加密的数据
16 let crypted = cipher.update(data, 'utf-8', 'hex');
17
18 crypted += cipher.final('hex');
19
20 return crypted;
21};
22
23// 创建解密算法
24const aseDecode = function(data, password) {

Callers 1

token.jsFile · 0.85

Calls 1

updateMethod · 0.45

Tested by

no test coverage detected