Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F77937608
test-medco-crypto-web.html
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Aug 17, 08:20
Size
644 B
Mime Type
text/html
Expires
Mon, Aug 19, 08:20 (2 d)
Engine
blob
Format
Raw Data
Handle
19934172
Attached To
R4897 i2b2-webclient
test-medco-crypto-web.html
View Options
<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
Log In to Comment