mirror of
https://gogs.blitter.com/RLabs/xs
synced 2024-08-14 10:26:42 +00:00
GoReporter recommended cleanup
This commit is contained in:
parent
4b059242d9
commit
ea01123b87
2 changed files with 7 additions and 7 deletions
|
@ -285,7 +285,7 @@ func (r randReader) Read(b []byte) (n int, e error) {
|
|||
return
|
||||
}
|
||||
|
||||
func KyberDialSetup(c net.Conn, hc *Conn) (err error) {
|
||||
func KyberDialSetup(c io.ReadWriter /*net.Conn*/, hc *Conn) (err error) {
|
||||
// Send hkexnet.Conn parameters to remote side
|
||||
|
||||
// Alice, step 1: Generate a key pair.
|
||||
|
@ -335,7 +335,7 @@ func KyberDialSetup(c net.Conn, hc *Conn) (err error) {
|
|||
return
|
||||
}
|
||||
|
||||
func HKExDialSetup(c net.Conn, hc *Conn) (err error) {
|
||||
func HKExDialSetup(c io.ReadWriter /*net.Conn*/, hc *Conn) (err error) {
|
||||
var h *hkex.HerraduraKEx
|
||||
switch hc.kex {
|
||||
case KEX_HERRADURA256:
|
||||
|
|
|
@ -43,7 +43,7 @@ var (
|
|||
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
const Bob = string("\r\n\r\n" +
|
||||
const bob = string("\r\n\r\n" +
|
||||
"@@@@@@@^^~~~~~~~~~~~~~~~~~~~~^@@@@@@@@@\r\n" +
|
||||
"@@@@@@^ ~^ @ @@ @ @ @ I ~^@@@@@@\r\n" +
|
||||
"@@@@@ ~ ~~ ~I @@@@@\r\n" +
|
||||
|
@ -70,8 +70,8 @@ const Bob = string("\r\n\r\n" +
|
|||
"\r\n")
|
||||
|
||||
type (
|
||||
EscHandler func(io.Writer)
|
||||
EscSeqs map[byte]EscHandler
|
||||
escHandler func(io.Writer)
|
||||
escSeqs map[byte]escHandler
|
||||
)
|
||||
|
||||
// Copy copies from src to dst until either EOF is reached
|
||||
|
@ -117,10 +117,10 @@ func copyBuffer(dst io.Writer, src io.Reader, buf []byte) (written int64, err er
|
|||
// outlive individual copyBuffer calls).
|
||||
// (Note that since this custom copyBuffer func is used only by
|
||||
// the hkexsh client, it should eventually be moved to client.)
|
||||
escs := EscSeqs{
|
||||
escs := escSeqs{
|
||||
'i': func(io.Writer) { os.Stdout.Write([]byte("\x1b[s\x1b[2;1H\x1b[1;31m[HKEXSH]\x1b[39;49m\x1b[u")) },
|
||||
't': func(io.Writer) { os.Stdout.Write([]byte("\x1b[1;32m[HKEXSH]\x1b[39;49m")) },
|
||||
'B': func(io.Writer) { os.Stdout.Write([]byte("\x1b[1;32m" + Bob + "\x1b[39;49m")) },
|
||||
'B': func(io.Writer) { os.Stdout.Write([]byte("\x1b[1;32m" + bob + "\x1b[39;49m")) },
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue