sm4

package
v1.1.42 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const BlockSize = 16

Variables

This section is empty.

Functions

func Cbc

func Cbc(key []byte, in []byte, mode bool) (out []byte, err error)

func NewCipher

func NewCipher(key []byte) (cipher.Block, error)

NewCipher creates and returns a new cipher.Block.

Types

type Cipher

type Cipher struct {
	// contains filtered or unexported fields
}

Cipher is an instance of SM4 encryption.

func (*Cipher) BlockSize

func (c *Cipher) BlockSize() int

func (*Cipher) Decrypt

func (c *Cipher) Decrypt(dst, src []byte)

func (*Cipher) Encrypt

func (c *Cipher) Encrypt(dst, src []byte)

type Key

type Key []byte

Jump to

Keyboard shortcuts

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