Skip to content

docs: update crypto and base64 module docs #459

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/reference/model/base64.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ Encode the string `value` using the codec registered for encoding.

## decode

`decode(value: str, encoding: str = "utf-8") -> str`
`decode(value: str) -> str`

Decode the string `value` using the codec registered for encoding.
Decode the string `value` using the codec registered to the utf8 string for encoding.
6 changes: 6 additions & 0 deletions docs/reference/model/crypto.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ Encrypt the string `value` using `SHA384` and the codec registered for encoding.

Encrypt the string `value` using `SHA512` and the codec registered for encoding.

## blake3

`blake3(value: str, encoding: str = "utf-8") -> str`

Encrypt the string `value` using `BLAKE3` and the codec registered for encoding.

## uuid

`uuid() -> str`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ weight: 100

## decode

`decode(value: str, encoding: str = "utf-8") -> str`
`decode(value: str) -> str`

使用注册的编码器对字符串 `value` 进行解码
使用注册的编码器对字符串 `value` 进行解码,解码的结果是一个 utf8 字符串
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ weight: 100

使用注册编码器和 `SHA512` 算法对字符串 `value` 进行加密。

## blake3

`sha512(value: str, encoding: str = "utf-8") -> str`

使用注册编码器和 `BLAKE3` 算法对字符串 `value` 进行加密。

## uuid

`uuid() -> str`
Expand Down
Loading