Skip to main content

encrypt_token

Function encrypt_token 

Source
pub fn encrypt_token(plaintext: &str) -> Option<String>
Expand description

加密明文 token,返回 nonce‖ct‖tag 的 hex 字符串(存入 token_enc)。

密钥缺失或非法、系统随机源失败、加密失败时返回 None。