os.loadAPI("chacha")
local sock = require("soqet")
local client = sock.new()
local key = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16}
client.connect()
client.open("ENCRYPTED")
local file = fs.open("/.chacha.nounces", "r")
while true do
local ch, msg, meta = client.receive()
local decrypted = chacha.decrypt(msg,key)
print(string.format("[%s] %s", meta.channel, decrypted))
end