master
parent
b25c63f4cf
commit
1d77887823
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue