未验证 提交 900aa6b6 编写于 作者: O openharmony_ci 提交者: Gitee

!22934 将HUKS的示例代码明确为js风格

Merge pull request !22934 from CheungVane/master
...@@ -6,6 +6,7 @@ HUKS所管理的密钥可以由应用导入或者由应用调用HUKS接口生成 ...@@ -6,6 +6,7 @@ HUKS所管理的密钥可以由应用导入或者由应用调用HUKS接口生成
> **说明** > **说明**
> >
> 本模块首批接口从API version 8开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。 > 本模块首批接口从API version 8开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
> 以下示例代码片段仅适用于JS语言开发。
## 导入模块 ## 导入模块
...@@ -896,7 +897,7 @@ async function TestExportFunc(alias, options) { ...@@ -896,7 +897,7 @@ async function TestExportFunc(alias, options) {
} }
} }
function exportKey(alias, options) : Promise<huks.HuksReturnResult> { function exportKey(alias, options) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
try { try {
huks.exportKeyItem(alias, options, function (error, data) { huks.exportKeyItem(alias, options, function (error, data) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册