Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F85246899
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
Fri, Sep 27, 19:00
Size
644 B
Mime Type
text/html
Expires
Sun, Sep 29, 19:00 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
21148288
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