Skip to main content

Module guomi

Module guomi 

Source
Expand description

国密实现(对应 PHP 版 Guomi/):SM3 哈希、SM4-CBC、ZUC-128 流密码、 SM2 非对称加解密,以及不提供实现的 SM1 / SM7 / SM9 占位。

Modules§

unavailable
SM1 / SM7 / SM9 在公开生态中无标准实现:调用下列函数将返回明确的 Error::UnsupportedNationalAlgorithm,便于在业务层统一捕获或接入 厂商 SDK / 加密机。

Structs§

KeyPairHex
SM2 密钥对(十六进制):私钥 64 位,公钥 130 位(非压缩 04‖X‖Y)。
Sm2AsymmetricCipher
SM2 非对称加密器(实现 AsymmetricCipher;行为与 Sm2Service 一致)。
Sm2Service
SM2 静态门面(对应 PHP 版 Sm2EncryptionService)。
Sm3Hasher
SM3 哈希器(无状态,可复用)。
Sm4CbcEncryptor
SM4-CBC 加密器。
Zuc128Encryptor
ZUC-128 加密器。