Closed wxiaoguang closed 1 year ago
可以改成这样:
type sm4CipherGo struct { subkeys [32]uint32 } func (c *sm4CipherGo) Encrypt(dst, src []byte) { var block1 [4]uint32 var block2 [16]byte sm4cryptBlock(c.subkeys[:], block1[:], block2[:], dst, src, false) } func (c *sm4CipherGo) Decrypt(dst, src []byte) { var block1 [4]uint32 var block2 [16]byte sm4cryptBlock(c.subkeys[:], block1[:], block2[:], dst, src, true) }
可以改成这样: