Page MenuHomec4science

test-medco-crypto-web.html
No OneTemporary

File Metadata

Created
Sat, Aug 17, 08:20

test-medco-crypto-web.html

<head>
<title>JS encryption tests</title>
<script type="text/javascript" src="test-medco-crypto-web.js"></script>
<script>
function myfunc() {
/*
keys = GenKey()
sk = keys[0]
pk = keys[1]
cipher = EncryptInt(pk, 9000)
plain = DecryptInt(cipher, sk)
alert(plain)*/
// it should print 9876
plain = DecryptInt("F43RC98qfZJp9ClCz4UY9PhZ/jSTnjbN6+K00rH7MEc3jrenGWZsnvv/PYbp3uAnW2Yh0cZQzs3+O76MT2Kt7w==", "U/MCDDfD63GSZiP26OrCU3HIkvqHdyReYV/vEk8oZQM=")
alert(plain)
}
</script>
</head>
<body>
<input type="button" onclick="myfunc()" value="CLICK ME">
</body>
</html>

Event Timeline