Documentation
¶
Index ¶
- Constants
- func Adler32(d uint32, p []byte) uint32
- func GenEnableEncryptionSignature(encryptKey []byte) ([]byte, error)
- func GetConnectionRSAKey() *rsa.PrivateKey
- func Hash(hsh func() hash.Hash, input ...[]byte) []byte
- func RandBytes(ln int) []byte
- func RandUint32(min, max uint32) uint32
- func ReverseBytes(bytes []byte)
- func SHA1(input ...[]byte) []byte
- type AesCipher
- type Cipher
- type DummyCipher
- type SessionKeyGenerator
Constants ¶
View Source
const ConnectionRSAKey = `` /* 1678-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
func GetConnectionRSAKey ¶
func GetConnectionRSAKey() *rsa.PrivateKey
func ReverseBytes ¶
func ReverseBytes(bytes []byte)
Types ¶
type Cipher ¶
type Cipher interface { Init(server bool, key []byte) error Encrypt(data, tag []byte) error Decrypt(data, tag []byte) error }
Cipher describes some method for setting up an encryption layer over a TCP socket.
type DummyCipher ¶
type DummyCipher struct { }
func (DummyCipher) Decrypt ¶
func (d DummyCipher) Decrypt(data, tag []byte) error
func (DummyCipher) Encrypt ¶
func (d DummyCipher) Encrypt(data, tag []byte) error
type SessionKeyGenerator ¶
func NewSessionKeyGenerator ¶
func NewSessionKeyGenerator(hashFunc func() hash.Hash, data []byte) *SessionKeyGenerator
Source Files
¶
Click to show internal directories.
Click to hide internal directories.