master
rnd 2018-07-08 21:41:29 +02:00
parent b25c63f4cf
commit 1d77887823
2 changed files with 4 additions and 3 deletions

View File

@ -5,7 +5,7 @@
if not init then
msgerver = "05172018b"
targetid = {id = "qtest", name = "qtest"} -- WRITE IN WHO you want to talk to - id = real identity & name = current playername
targetid = {id = "quater", name = "quater"} -- WRITE IN WHO you want to talk to - id = real identity & name = current playername
myid = {id = "rnd", name = minetest.localplayer:get_name()} -- your identity
-- targetid = {id = "rnd", name = "rnd"} -- real identity & playername

View File

@ -177,11 +177,12 @@ local DSAtest = function ()
say("PUBLIC KEY = " .. publickey)
local msg = "i, rnd, state that i wrote all this from scratch :)";
local msg = "05/20/2018 i, rnd, state that i wrote all this from scratch :)";
say("MESSAGE = " .. msg)
local sig = DSA.sign(msg,privatekey)
say("SIGNATURE = " .. sig)
local ok = DSA.verify(msg,sig,publickey);
local msg1 = "05/20/2018 i, rnd, state that i wrote all this from scratch :)"
local ok = DSA.verify(msg1,sig,publickey);
if ok then say(minetest.colorize("lawngreen","VERIFY: ok")) else say(minetest.colorize("red","VERIFY: fail")) end
end