This commit is contained in:
Anavrins
2020-03-30 02:07:20 -04:00
parent 369070e19c
commit 39522ee5b1
9 changed files with 78 additions and 71 deletions

View File

@@ -139,7 +139,7 @@ function Socket.connect(host, port, options)
dhost = socket.dhost,
t = Crypto.encrypt({ -- this is not that much data...
ts = os.epoch('utc'),
pk = Util.byteArrayToHex(socket.pubKey),
pk = socket.pubKey:toHex(),
}, Util.hexToByteArray(identifier)),
})
@@ -237,7 +237,7 @@ function Socket.server(port, options)
type = 'CONN',
dhost = socket.dhost,
shost = socket.shost,
pk = Util.byteArrayToHex(socket.pubKey),
pk = socket.pubKey:toHex(),
options = socket.options.ENCRYPT and { ENCRYPT = true },
})