Documentation
¶
Index ¶
- func CalcuChecksum(data []byte) uint32
- func GenRandomData(dataLen int16) []byte
- func GetDESCipherBlockSize() int
- func InitCAESCipher(aesKey [32]byte, aesInitType uint8)
- func InitTripleDESCipher(desKey string)
- func ROL1(val byte, num int) byte
- func ROL4(value uint32, shift uint32) uint32
- func ROR1(val byte, num int) byte
- type CAESCipher
- type CIGCipher
- func (static *CIGCipher) Decrypt(buf []byte, dwKey []byte)
- func (static *CIGCipher) Encrypt(buf []byte, dwKey []byte)
- func (static *CIGCipher) InnoHash(dwKey []byte)
- func (static *CIGCipher) InnoHashOld(dwKey []byte)
- func (static *CIGCipher) Shuffle(dwKey []byte, inputKey byte)
- func (static *CIGCipher) ShuffleOld(dwKey []byte, inputKey byte)
- type CIOBufferManipulator
- type LinearCipher
- type TripleDESCipher
- type XORCipher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalcuChecksum ¶ added in v1.2.0
func GenRandomData ¶ added in v1.2.0
func GetDESCipherBlockSize ¶ added in v1.2.0
func GetDESCipherBlockSize() int
func InitCAESCipher ¶ added in v1.2.0
func InitTripleDESCipher ¶ added in v1.2.0
func InitTripleDESCipher(desKey string)
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) InnoHash ¶
InnoHash is unsigned int __cdecl CIGCipher::innoHash(unsigned __int8 *pSrc, int nLen, unsigned int *pdwKey).
func (*CIGCipher) InnoHashOld ¶ added in v1.1.8
func (*CIGCipher) ShuffleOld ¶ added in v1.1.8
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{}