crypt

package
v0.23.1 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2019 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AesDecrypt

func AesDecrypt(crypted, key []byte) ([]byte, error)

de

func AesEncrypt

func AesEncrypt(origData, key []byte) ([]byte, error)

en

func GetRandomString

func GetRandomString(l int) string

Generating Random Verification Key

func InitTls added in v0.19.0

func InitTls(pem, key string)

func Md5

func Md5(s string) string

Generate 32-bit MD5 strings

func NewTlsClientConn added in v0.18.1

func NewTlsClientConn(conn net.Conn) net.Conn

func NewTlsServerConn added in v0.18.1

func NewTlsServerConn(conn net.Conn) net.Conn

func PKCS5Padding

func PKCS5Padding(ciphertext []byte, blockSize int) []byte

Completion when the length is insufficient

func PKCS5UnPadding

func PKCS5UnPadding(origData []byte) (error, []byte)

Remove excess

Types

type ClientHelloMsg added in v0.21.0

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

func (*ClientHelloMsg) GetServerName added in v0.21.0

func (m *ClientHelloMsg) GetServerName() string

func (*ClientHelloMsg) Unmarshal added in v0.21.0

func (m *ClientHelloMsg) Unmarshal(data []byte) bool

type CurveID added in v0.21.0

type CurveID uint16

type SignatureScheme added in v0.21.0

type SignatureScheme uint16

Jump to

Keyboard shortcuts

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