> For the complete documentation index, see [llms.txt](https://doc.duaer.com/zh/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.duaer.com/zh/build/crypto.md).

# 在 Duaer 里用 Crypto 做哈希

在 Duaer 里，Crypto 默认 Action 是 Hash。Type 默认 SHA256，结果写到 Property Name（默认 data），Encoding 默认 HEX。
## 给一段文本算 SHA256

1. 搜索 Crypto，接到上一个节点后面。
2. Action 保持 Hash。
3. Type 保持 SHA256。
4. Value 填要哈希的字符串，或用表达式引用字段。
5. Property Name 默认是 data。Encoding 默认是 HEX。
6. 点执行此步骤。输出条目上多了这个哈希字段。

其他 Action：Generate、Hmac、Sign、Encrypt、Decrypt。Hmac、Sign、Encrypt、Decrypt 需要配置 Crypto 凭据；Hash 和 Generate 不需要。

Binary File 打开时，Hash 从 binary 字段读入，再填 Binary Property Name（默认 data）。
## Questions

### Duaer 的 Crypto Hash 会把原文存进凭据吗？

不会。Hash 只在这次执行里算摘要。需要密钥的操作才用 Crypto 凭据。

