crypt

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalcuChecksum added in v1.2.0

func CalcuChecksum(data []byte) uint32

func GenRandomData added in v1.2.0

func GenRandomData(dataLen int16) []byte

func GetDESCipherBlockSize added in v1.2.0

func GetDESCipherBlockSize() int

func InitCAESCipher added in v1.2.0

func InitCAESCipher(aesKey [32]byte, aesInitType uint8)

func InitTripleDESCipher added in v1.2.0

func InitTripleDESCipher(desKey string)

func ROL1

func ROL1(val byte, num int) byte

func ROL4

func ROL4(value uint32, shift uint32) uint32

func ROR1

func ROR1(val byte, num int) byte

Types

type CAESCipher

type CAESCipher struct{}

func (*CAESCipher) AESInit added in v1.1.7

func (static *CAESCipher) AESInit(dwKey []byte) []byte

AESInit is void __cdecl CAESCipher::AES_DecInit(CAESCipher::AES_ALG_INFO *AlgInfo, unsigned int *pdwKey). AESInit is void __cdecl CAESCipher::AES_EncInit(CAESCipher::AES_ALG_INFO *AlgInfo, unsigned int *pdwKey).

func (*CAESCipher) Decrypt

func (static *CAESCipher) Decrypt(buf []byte, dwkey []byte)

Decrypt is void __cdecl CAESCipher::Decrypt(unsigned __int8 *pDest, unsigned __int8 *pSrc, int nLen, unsigned int *pdwKey).

func (*CAESCipher) Encrypt

func (static *CAESCipher) Encrypt(buf []byte, dwkey []byte)

Encrypt is void __cdecl CAESCipher::Encrypt(unsigned __int8 *pDest, unsigned __int8 *pSrc, int nLen, unsigned int *pdwKey).

func (*CAESCipher) OFBUpdate added in v1.1.7

func (static *CAESCipher) OFBUpdate(buf []byte, chainVar []byte)

OFBUpdate is char __cdecl CAESCipher::OFB_DecUpdate(CAESCipher::AES_ALG_INFO *AlgInfo,char *CipherTxt,unsigned int CipherTxtLen,char *PlainTxt,unsigned int *PlainTxtLen). OFBUpdate is char __cdecl CAESCipher::OFB_EncUpdate(CAESCipher::AES_ALG_INFO *AlgInfo,char *PlainTxt,unsigned int PlainTxtLen,char *CipherTxt,unsigned int *CipherTxtLen).

type CIGCipher

type CIGCipher struct{}

func (*CIGCipher) Decrypt added in v1.1.8

func (static *CIGCipher) Decrypt(buf []byte, dwKey []byte)

func (*CIGCipher) Encrypt added in v1.1.8

func (static *CIGCipher) Encrypt(buf []byte, dwKey []byte)

func (*CIGCipher) InnoHash

func (static *CIGCipher) InnoHash(dwKey []byte)

InnoHash is unsigned int __cdecl CIGCipher::innoHash(unsigned __int8 *pSrc, int nLen, unsigned int *pdwKey).

func (*CIGCipher) InnoHashOld added in v1.1.8

func (static *CIGCipher) InnoHashOld(dwKey []byte)

func (*CIGCipher) Shuffle added in v1.0.8

func (static *CIGCipher) Shuffle(dwKey []byte, inputKey byte)

func (*CIGCipher) ShuffleOld added in v1.1.8

func (static *CIGCipher) ShuffleOld(dwKey []byte, inputKey byte)

type CIOBufferManipulator

type CIOBufferManipulator struct{}

func (*CIOBufferManipulator) De

func (static *CIOBufferManipulator) De(buf []byte)

func (*CIOBufferManipulator) En

func (static *CIOBufferManipulator) En(buf []byte)

type LinearCipher added in v1.1.6

type LinearCipher struct{}

func (*LinearCipher) Decrypt added in v1.1.6

func (static *LinearCipher) Decrypt(buf []byte, dwKey []byte)

func (*LinearCipher) Encrypt added in v1.1.6

func (static *LinearCipher) Encrypt(buf []byte, dwKey []byte)

type TripleDESCipher added in v1.1.2

type TripleDESCipher struct{}

func (*TripleDESCipher) Decrypt added in v1.1.2

func (static *TripleDESCipher) Decrypt(buf []byte) (string, error)

func (*TripleDESCipher) Encrypt added in v1.1.2

func (static *TripleDESCipher) Encrypt(content string) ([]byte, error)

type XORCipher added in v1.0.9

type XORCipher struct{}

func (*XORCipher) Decrypt added in v1.0.9

func (static *XORCipher) Decrypt(buf []byte, dwKey []byte)

func (*XORCipher) Encrypt added in v1.0.9

func (static *XORCipher) Encrypt(buf []byte, dwKey []byte)

func (*XORCipher) Shuffle added in v1.0.9

func (static *XORCipher) Shuffle(dwKey []byte)

Jump to

Keyboard shortcuts

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