未验证 提交 6d60840f 编写于 作者: O openharmony_ci 提交者: Gitee

!5722 修改cipher模块回调函数的打印

Merge pull request !5722 from 陈浩/master
......@@ -50,11 +50,13 @@ export default {
'+Enz0RzmVFh/4yk6lmqRzuEFQqhQqSZzaLq6sq2N2G0Sv2Xl3sLvqAfe2HNm2oBw\n' +
'jBpApTJ3TeneOo6Z5QIDAQAB',
success: function(data) {
console.log(data.data.text);
console.log(`handling success:${data.text}`);
},
fail: function(data, code) {
console.log(code.code);
console.log(data.data);
console.log(`### cipher.rsa encrypt fail ### ${code}:${data}`);
},
complete: function() {
console.log(`operation complete!`);
}
});
cipher.rsa({
......@@ -81,12 +83,14 @@ export default {
'M9TORIgdH8MjIbWsGnndAkEAw9yURDaorE8IYPLF2IEn09g1uzvWPs3phDb6smVx\n' +
'8GfqIdUNf+aCG5TZK/kXBF1sqcsi7jXMAf4jBlejVbSVZg==',
success: function(data) {
console.log(data.data.text);
console.log(`handling success:${data.text}`);
},
fail: function(data, code) {
console.log(code.code);
console.log(data.data);
console.log(`### cipher.rsa encrypt fail ### ${code}:${data}`);
},
complete: function() {
console.log(`operation complete!`);
}
});
}
}
......@@ -131,12 +135,14 @@ export default {
transformation: 'AES/CBC/PKCS5Padding',
ivOffset: '0',
ivLen: '16',
success: (data) => {
console.log(data.data.text);
success: function(data) {
console.log(`handling success:${data.text}`);
},
fail: function(data, code) {
console.log(`### cipher.rsa encrypt fail ### ${code}:${data}`);
},
fail: (data, code) => {
console.log(code.code);
console.log(data.data);
complete: function() {
console.log(`operation complete!`);
}
});
cipher.aes({
......@@ -149,12 +155,14 @@ export default {
transformation: 'AES/CBC/PKCS5Padding',
ivOffset: '0',
ivLen: '16',
success: (data) => {
console.log(data.data.text);
success: function(data) {
console.log(`handling success:${data.text}`);
},
fail: function(data, code) {
console.log(`### cipher.rsa encrypt fail ### ${code}:${data}`);
},
fail: (data, code) => {
console.log(code.code);
console.log(data.data);
complete: function() {
console.log(`operation complete!`);
}
});
});
......@@ -162,3 +170,4 @@ export default {
}
```
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册