提交 65dff8f5 编写于 作者: C CheungVane

modify the demo code

Signed-off-by: Nzhangwenzhi <zhangwenzhi3@huawei.com>
上级 a3e39182
......@@ -822,9 +822,9 @@ async function attestKey() {
properties: properties
};
generateKey(aliasString);
setTimeout(()=>huks.attestKey(aliasString, options, function (err, data) {
huks.attestKey(aliasString, options, function (err, data) {
printLog(`key attest result : ${JSON.stringify(data)}`);
}), 1000);
});
}
```
......@@ -894,8 +894,13 @@ async function attestKey() {
properties: properties
};
generateKey(aliasString);
let result = await huks.exportKey(attestKey, options);
printLog(`key attest result : ${result.errorCode}`);
huks.attestKey(aliasString, options)
.then((data) => {
console.log(`test attestKey data: ${JSON.stringify(data)}`);
})
.catch((err) => {
console.log('test attestKey information: ' + JSON.stringify(err));
});
}
```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册