Skip to content

Commit 5eb9710

Browse files
committed
docs: add crypto.uuid and crypto.filesha256 documents
Signed-off-by: peefy <xpf6677@163.com>
1 parent 8246973 commit 5eb9710

File tree

2 files changed

+24
-0
lines changed
  • docs/reference/model
  • i18n/zh-CN/docusaurus-plugin-content-docs/current/reference/model

2 files changed

+24
-0
lines changed

docs/reference/model/crypto.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,15 @@ Encrypt the string `value` using `SHA384` and the codec registered for encoding.
4141
`sha512(value: str, encoding: str = "utf-8") -> str`
4242

4343
Encrypt the string `value` using `SHA512` and the codec registered for encoding.
44+
45+
## uuid
46+
47+
`uuid() -> str`
48+
49+
Generate a random UUID string.
50+
51+
## filesha256
52+
53+
`filesha256(filepath: str) -> str`
54+
55+
Calculate the SHA256 hash of the file `filepath`.

i18n/zh-CN/docusaurus-plugin-content-docs/current/reference/model/crypto.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,15 @@ weight: 100
4141
`sha512(value: str, encoding: str = "utf-8") -> str`
4242

4343
使用注册编码器和 `SHA512` 算法对字符串 `value` 进行加密。
44+
45+
## uuid
46+
47+
`uuid() -> str`
48+
49+
生成一个随机 UUID 字符串。
50+
51+
## filesha256
52+
53+
`filesha256(filepath: str) -> str`
54+
55+
计算文件 `filepath` 的 SHA256 哈希。

0 commit comments

Comments
 (0)