Versions in this module Expand all Collapse all v0 v0.0.1 Apr 10, 2024 Changes in this version + const AES128 + const AES192 + const AES256 + const ALGO_MASK + const CBC_MODE + const CFB_MODE + const DES + const DES3 + const DES_CFB + const DH_KEY_LENGTH + const ECB_MODE + const MD5 + const MD5_DIGEST_SIZE + const MIN_EXTERNAL_CIPHER_ID + const OFB_MODE + const RC4 + const WORK_MODE_MASK + func AnyOverlap(x, y []byte) bool + func Bn2Bytes(bn *big.Int, bnLen int) []byte + func ComputeSessionKey(clientPrivKey *DhKey, serverPubKey []byte) []byte + func InexactOverlap(x, y []byte) bool + func NewECBDecrypter(b cipher.Block) cipher.BlockMode + func NewECBEncrypter(b cipher.Block) cipher.BlockMode + func NewTLSFromTCP(conn *net.TCPConn, sslCertPath string, sslKeyPath string, user string) (*tls.Conn, error) + type Cipher interface + Decrypt func(ciphertext []byte, checkDigest bool) ([]byte, error) + Encrypt func(plaintext []byte, genDigest bool) []byte + type DhKey struct + func NewClientKeyPair() (key *DhKey, err error) + func (dk *DhKey) GetX() *big.Int + func (dk *DhKey) GetY() *big.Int + func (dk *DhKey) GetYBytes() []byte + func (dk *DhKey) GetYString() string + func (dk *DhKey) IsPrivateKey() bool + type SymmCipher struct + func NewSymmCipher(algorithmID int, key []byte) (SymmCipher, error) + func (sc SymmCipher) Decrypt(ciphertext []byte, checkDigest bool) ([]byte, error) + func (sc SymmCipher) Encrypt(plaintext []byte, genDigest bool) []byte + type ThirdPartCipher struct + func NewThirdPartCipher(encryptType int, key []byte, cipherPath string, hashType int) (ThirdPartCipher, error) + func (tpc ThirdPartCipher) Decrypt(ciphertext []byte, checkDigest bool) ([]byte, error) + func (tpc ThirdPartCipher) Encrypt(plaintext []byte, genDigest bool) []byte