Documentation ¶
Index ¶
- Constants
- func Decrypt(dataP string, key []byte) (string, error)
- func DecryptBlock(key SM4Key, dst, src []byte)
- func Encrypt(datap string, key []byte) (string, error)
- func EncryptBlock(key SM4Key, dst, src []byte)
- func NewCipher(key []byte) (cipher.Block, error)
- func PKCS5Padding(ciphertext []byte, blockSize int) []byte
- func PKCS5UnPadding(origData []byte) []byte
- func WriteKeyToPem(FileName string, key SM4Key, pwd []byte) (bool, error)
- func WriteKeytoMem(key SM4Key, pwd []byte) ([]byte, error)
- type KeySizeError
- type SM4Key
- type Sm4Cipher
Constants ¶
View Source
const BlockSize = 16
Variables ¶
This section is empty.
Functions ¶
func DecryptBlock ¶
func EncryptBlock ¶
func PKCS5Padding ¶
func PKCS5UnPadding ¶
Types ¶
type KeySizeError ¶
type KeySizeError int
func (KeySizeError) Error ¶
func (k KeySizeError) Error() string
Click to show internal directories.
Click to hide internal directories.