1
0
mirror of https://github.com/kepler155c/opus synced 2025-11-14 06:17:13 +00:00

The big Anavrins security update (round 1)

This commit is contained in:
kepler155c@gmail.com
2019-06-27 21:08:46 -04:00
parent 97a442e999
commit bcd33af599
17 changed files with 2308 additions and 204 deletions

View File

@@ -1,6 +1,6 @@
local Crypto = require('crypto')
local Crypto = require('crypto.chacha20')
local Security = require('security')
local SHA1 = require('sha1')
local SHA2 = require('crypto.sha2')
local Socket = require('socket')
local Terminal = require('terminal')
@@ -35,7 +35,7 @@ end
local publicKey = Security.getPublicKey()
socket:write(Crypto.encrypt({ pk = publicKey, dh = os.getComputerID() }, SHA1.sha1(password)))
socket:write(Crypto.encrypt({ pk = publicKey, dh = os.getComputerID() }, SHA2.digest(password):toHex()))
local data = socket:read(2)
socket:close()