sm4

package
v0.0.0-...-c1449ee Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 25, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultEcb = []byte{'J', 'e', 'F', '8', 'U', '9', 'w', 'H', 'F', 'O', 'M', 'f', 's', '2', 'Y', '8'}

ecb mode

View Source
var DefaultInfo = []byte{'1', '1', 'H', 'D', 'E', 'S', 'a', 'A', 'h', 'i', 'H', 'H', 'u', 'g', 'D', 'z'}

cbc mode

View Source
var DefaultIv = []byte{'U', 'I', 'S', 'w', 'D', '9', 'f', 'W', '6', 'c', 'F', 'h', '9', 'S', 'N', 'S'}

Functions

func Decode

func Decode(input, key []byte) ([]byte, error)

func DecodeCBC

func DecodeCBC(input, key, iv []byte) ([]byte, error)

func DecodeEcbBase64

func DecodeEcbBase64(inputStr string) ([]byte, error)

先base64解码,然后sm4 ecb解密

func DefaultDecode

func DefaultDecode(input []byte) ([]byte, error)

func DefaultDecodeBase64

func DefaultDecodeBase64(inputStr string) ([]byte, error)

先base64解码,然后sm4解密

func DefaultEncode

func DefaultEncode(input []byte) ([]byte, error)

func EncodeCBC

func EncodeCBC(input, key, iv []byte) ([]byte, error)

func EncodeECB

func EncodeECB(input, key []byte) ([]byte, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL