Files
marqdo/lib/机密.mq.md
T
cflmyandCursor 08384c7540 feat(stdlib): Mid M3 hash digests and secure tokens
Add lib/hash and lib/secrets (EN/ZH) with known-vector golds,
getrandom-backed tokens, and public demos.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-07 20:15:36 +08:00

19 lines
437 B
Markdown

---
title: lib/机密
description: 安全随机令牌(中层 M3)。勿用 math.random 生成令牌。
---
## 十六进制令牌
+ `字节数`=None
字节长度(默认 16),返回长度为 `2*字节数` 的小写 hex。
**> host_secrets_token_hex n=`字节数`**
## 网址安全令牌
+ `字节数`=None
字节长度(默认 16),URL-safe Base64(无填充)。
**> host_secrets_token_urlsafe n=`字节数`**