常量
旧版无前缀 SM3 摘要入口。
计算 SM3 哈希摘要(优化实现,减少内存分配并直接操作缓冲区)
输入数据(字符串或 Uint8Array)
可选
哈希选项
哈希摘要(默认为小写十六进制字符串,64 个字符)
// 十六进制格式(默认)const hash = digest('abc');// Base64 格式const hash64 = digest('abc', { outputFormat: OutputFormat.BASE64 }); 复制
// 十六进制格式(默认)const hash = digest('abc');// Base64 格式const hash64 = digest('abc', { outputFormat: OutputFormat.BASE64 });
请改用 sm3Digest。
旧版无前缀 SM3 摘要入口。