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

!15310 [翻译完成】#I6E35M (仅涉及代码和格式更改)

Merge pull request !15310 from Annie_wang/PR14498
......@@ -60,9 +60,9 @@ Calculates a hash value for a file. This API uses a promise to return the result
**Return value**
| Type | Description |
| --------------------- | -------------------------- |
| Promise<string> | Promise used to return the hash value. The hash value is a hexadecimal string consisting of digits and uppercase letters.|
| Type | Description |
| --------------------- | -------------------------- |
| Promise<string> | Promise used to return the hash value. The hash value is a hexadecimal string consisting of digits and uppercase letters.|
**Example**
......@@ -93,6 +93,7 @@ Calculates a hash value for a file. This API uses an asynchronous callback to re
**Example**
```js
let filePath = pathDir + "/test.txt";
Hash.hash(filePath, "sha256", (err, str) => {
if (err) {
console.info("calculate file hash failed with error message: " + err.message + ", error code: " + err.code);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册