Versions in this module Expand all Collapse all v2 v2.3.3 Oct 19, 2023 Changes in this version + const SM3_BLOCK_SIZE + const SM3_DIGEST_LENGTH + const SM3_HMAC_SIZE + func ConvertSMCipherModeToC(mode SM2CipherMode) C.SM2CipherMode + func ConvertSMSignModeToC(mode SM2SignMode) C.SM2SignMode + func GenerateKeyPair(ctx *SM2_ctx_t, outPriKey []byte, outPubKey []byte) int + func GeneratePrivateKey(ctx *SM2_ctx_t, out []byte) int + func GeneratePublicKey(ctx *SM2_ctx_t, privateKey []byte, outPubKey []byte) int + func GenerateSM4Key(outkey []byte) + func SM2CtxSize() int + func SM2Decrypt(ctx *SM2_ctx_t, in []byte, inlen int, strPriKey []byte, prikeyLen int, ...) int + func SM2DecryptWithMode(ctx *SM2_ctx_t, in []byte, inlen int, strPriKey []byte, prikeyLen int, ...) int + func SM2Encrypt(ctx *SM2_ctx_t, in []byte, inlen int, strPubKey []byte, pubkeyLen int, ...) int + func SM2EncryptWithMode(ctx *SM2_ctx_t, in []byte, inlen int, strPubKey []byte, pubkeyLen int, ...) int + func SM2FreeCtx(ctx *SM2_ctx_t) + func SM2InitCtx(ctx *SM2_ctx_t) + func SM2InitCtxWithPubKey(ctx *SM2_ctx_t, pubkey []byte) + func SM2Sign(ctx *SM2_ctx_t, msg []byte, msglen int, id []byte, idlen int, strPubKey []byte, ...) int + func SM2SignWithMode(ctx *SM2_ctx_t, msg []byte, msglen int, id []byte, idlen int, strPubKey []byte, ...) int + func SM2Verify(ctx *SM2_ctx_t, msg []byte, msglen int, id []byte, idlen int, sig []byte, ...) int + func SM2VerifyWithMode(ctx *SM2_ctx_t, msg []byte, msglen int, id []byte, idlen int, sig []byte, ...) int + func SM3(data []byte, datalen int, digest []byte) + func SM3CtxSize() int + func SM3Final(ctx *SM3_ctx_t, digest []byte) + func SM3HmacFinal(ctx *HmacSm3Ctx, mac []byte, macLen int) int + func SM3HmacUpdate(ctx *HmacSm3Ctx, data []byte, dataLen int) int + func SM3Init(ctx *SM3_ctx_t) + func SM3Update(ctx *SM3_ctx_t, data []byte, datalen int) + func SM3_HMAC(ctx *HmacSm3Ctx, data []byte, dataLen int, key []byte, keyLen int, mac []byte, ...) int + func SM4_CBC_Decrypt(in []byte, inlen int, out []byte, outlen *int, key []byte, iv []byte) + func SM4_CBC_Decrypt_NoPadding(in []byte, inlen int, out []byte, outlen *int, key []byte, iv []byte) + func SM4_CBC_Encrypt(in []byte, inlen int, out []byte, outlen *int, key []byte, iv []byte) + func SM4_CBC_Encrypt_NoPadding(in []byte, inlen int, out []byte, outlen *int, key []byte, iv []byte) + func SM4_ECB_Decrypt(in []byte, inlen int, out []byte, outlen *int, key []byte) + func SM4_ECB_Decrypt_NoPadding(in []byte, inlen int, out []byte, outlen *int, key []byte) + func SM4_ECB_Encrypt(in []byte, inlen int, out []byte, outlen *int, key []byte) + func SM4_ECB_Encrypt_NoPadding(in []byte, inlen int, out []byte, outlen *int, key []byte) + func SM4_GCM_Decrypt(in []byte, inlen int, out []byte, outlen *int, tag []byte, taglen int, ...) int + func SM4_GCM_Decrypt_NIST_SP800_38D(in []byte, inlen int, out []byte, outlen *int, tag []byte, taglen int, ...) int + func SM4_GCM_Decrypt_NoPadding(in []byte, inlen int, out []byte, outlen *int, tag []byte, taglen int, ...) + func SM4_GCM_Decrypt_NoPadding_NIST_SP800_38D(in []byte, inlen int, out []byte, outlen *int, tag []byte, taglen int, ...) int + func SM4_GCM_Encrypt(in []byte, inlen int, out []byte, outlen *int, tag []byte, taglen *int, ...) int + func SM4_GCM_Encrypt_NIST_SP800_38D(in []byte, inlen int, out []byte, outlen *int, tag []byte, taglen *int, ...) int + func SM4_GCM_Encrypt_NoPadding(in []byte, inlen int, out []byte, outlen *int, tag []byte, taglen *int, ...) + func SM4_GCM_Encrypt_NoPadding_NIST_SP800_38D(in []byte, inlen int, out []byte, outlen *int, tag []byte, taglen *int, ...) int + func Version() string + type HmacSm3Ctx struct + Context *C.TstHmacSm3Ctx + func SM3HMACInit(key []byte, keyLen int) *HmacSm3Ctx + type SM2CSRMode int + const SM2CSRMode_Double + const SM2CSRMode_Single + type SM2CipherMode int + const SM2CipherMode_C1C2C3 + const SM2CipherMode_C1C2C3_ASN1 + const SM2CipherMode_C1C3C2 + const SM2CipherMode_C1C3C2_ASN1 + type SM2SignMode int + const SM2SignMode_RS + const SM2SignMode_RS_ASN1 + type SM2_ctx_t struct + Context C.sm2_ctx_t + type SM3_ctx_t struct + Context C.sm3_ctx_t