Lines Matching refs:hash
1 # @ohos.file.hash (文件哈希处理)
12 import { hash } from '@kit.CoreFileKit';
33 ## hash.hash
35 hash(path: string, algorithm: string): Promise<string>
70 hash.hash(filePath, "sha256").then((str: string) => {
71 console.info("calculate file hash succeed:" + str);
73 …console.error("calculate file hash failed with error message: " + err.message + ", error code: " +…
77 ## hash.hash
79 hash(path: string, algorithm: string, callback: AsyncCallback<string>): void
109 hash.hash(filePath, "sha256", (err: BusinessError, str: string) => {
111 …console.error("calculate file hash failed with error message: " + err.message + ", error code: " +…
113 console.info("calculate file hash succeed:" + str);
117 ## hash.createHash<sup>12+</sup>
152 const hs = hash.createHash('sha256');
159 const fileHash = await hash.hash(filePath, 'sha256');
186 const hs = hash.createHash('sha256');
210 const hs = hash.createHash('sha256');