Documentation ¶
Index ¶
- Constants
- func DecryptBlock(key SM4Key, dst, src []byte)
- func EncryptBlock(key SM4Key, dst, src []byte)
- func NewCipher(key []byte) (cipher.Block, error)
- func Sm4DecCBCIV(key, iv, src []byte) ([]byte, error)
- func Sm4EncCBCIV(key, iv, src []byte) ([]byte, error)
- 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
BlockSize block size
Variables ¶
This section is empty.
Functions ¶
func Sm4DecCBCIV ¶
Sm4DecCBCIV decode sm4 cipher with cbc mode and initial vector
func Sm4EncCBCIV ¶
Sm4EncCBCIV enc iv length is 16, block length is 128bits
func WriteKeyToPem ¶
WriteKeyToPem WriteKeyToPem
Types ¶
type KeySizeError ¶
type KeySizeError int
KeySizeError size error
func (KeySizeError) Error ¶
func (k KeySizeError) Error() string
type SM4Key ¶
type SM4Key []byte
SM4Key key of sm4
func ReadKeyFromMem ¶
ReadKeyFromMem read key from memory
Click to show internal directories.
Click to hide internal directories.