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 WriteKeyToPem(FileName string, key SM4Key, pwd []byte) (bool, error)
- func WriteKeytoMem(key SM4Key, pwd []byte) ([]byte, error)
- type KeySizeError
- type SM4CBCCipher256
- type SM4Key
- type Sm4Cipher
Constants ¶
View Source
const BlockSize = 16
Variables ¶
This section is empty.
Functions ¶
func DecryptBlock ¶
func EncryptBlock ¶
Types ¶
type KeySizeError ¶
type KeySizeError int
func (KeySizeError) Error ¶
func (k KeySizeError) Error() string
type SM4CBCCipher256 ¶
type SM4CBCCipher256 struct { BufferPool *pkg.LimitedPool // contains filtered or unexported fields }
func NewSM4CBCCipher256 ¶
func NewSM4CBCCipher256(key, iv []byte) (*SM4CBCCipher256, error)
func (*SM4CBCCipher256) Decrypt ¶
func (sm4 *SM4CBCCipher256) Decrypt(src []byte) []byte
func (*SM4CBCCipher256) Encrypt ¶
func (sm4 *SM4CBCCipher256) Encrypt(src []byte) []byte
Click to show internal directories.
Click to hide internal directories.