【发布时间】:2016-04-10 20:20:26
【问题描述】:
我想为内部工具编写一个 C# Threema API。
这里是 API: https://gateway.threema.ch/en/developer/api
它说,对于端到端加密,必须有 NaCl 加密,当我理解正确时 - API 是一个 webAPI,它需要:
[nonce] nonce used for encryption (24 bytes, hex encoded)
[box] encrypted message data (max. 4000 bytes, hex encoded)
那么如何加密这些数据呢?当然,我可以为 nonce 生成一个 24 字节长的十六进制编码字符串,但是如何在 c# 中使用该 nonce 加密文本?
【问题讨论】:
标签: c# encryption nonce nacl-cryptography