diff options
Diffstat (limited to 'webclient')
| -rw-r--r-- | webclient/cryptoapplet.jar | bin | 21392 -> 0 bytes | |||
| -rw-r--r-- | webclient/lib/LICENSE | 19 | ||||
| -rw-r--r-- | webclient/lib/alias.js | 2 | ||||
| -rw-r--r-- | webclient/pubkey.html | 41 |
4 files changed, 1 insertions, 61 deletions
diff --git a/webclient/cryptoapplet.jar b/webclient/cryptoapplet.jar Binary files differdeleted file mode 100644 index 50a6f5b..0000000 --- a/webclient/cryptoapplet.jar +++ /dev/null diff --git a/webclient/lib/LICENSE b/webclient/lib/LICENSE deleted file mode 100644 index 06d6642..0000000 --- a/webclient/lib/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2006-2009 Collecta, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/webclient/lib/alias.js b/webclient/lib/alias.js index 8c4224a..c87e7dd 100644 --- a/webclient/lib/alias.js +++ b/webclient/lib/alias.js @@ -171,7 +171,7 @@ var Alias = { var encryptedKey = query.find('key').text(); var key = this.rsa.decrypt(encryptedKey); var encryptedContent = query.find('content').text(); - var content = sjcl.decrypt(key, encryptedContent); + var content = sjcl.decrypt(sjcl.codec.base64.toBits(key), encryptedContent); $('#profile').html(content); }, diff --git a/webclient/pubkey.html b/webclient/pubkey.html deleted file mode 100644 index ba1e845..0000000 --- a/webclient/pubkey.html +++ /dev/null @@ -1,41 +0,0 @@ -<!--?xml version="1.0" encoding="utf-8" ?--> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head> - <title>Cryptoapplet - Public key cryptography</title> -<script language="JavaScript" type="text/javascript"> -function test(){ -document.crypto.prepare(); - var PrivateKey = "30820155020100300d06092a864886f70d01010105000482013f3082013b\ - 0201000241009276c2d3b2559d2452dcb037ef6d5cb16d796b9167e83349\ - afcc15cdb8a4afde17be05a2735245f62e62efe32e79f335786e2e7cc56a\ - a97bbed3ae7b0501846f020301000102404413cb8f16af50b1578a98a607\ - 35f005d07ac592fa97256fb4b4c9d5ab637112b1b8e51e96fc2f82ae1fab\ - 244494a03ea10d314d59a103c1a8a17a6e4c44ffa1022100fd1e2ddd7b4b\ - 62bcf8fab5552e1b47544bf8e5d5345d79a57425b66e210436c902210094\ - 21b16b1468a790b2494efa0b63633126b61bce84f262300ad12c23c29925\ - 77022100e29b8f32577cb1443f9fac923af9ff0d100b203095760e3f3b51\ - bc16b2866449022100937e84f0d0ee6fc254b347cf131dcffb75c72822d7\ - 1f9d02a712a577a9e0e17b02204946478f016d03ada1497c05917fe4e82d\ - c00c301e33150f06b10603fd36d8d7"; - - var PublicKey = "305c300d06092a864886f70d0101010500034b0030480241009276c2d3b2\ - 559d2452dcb037ef6d5cb16d796b9167e83349afcc15cdb8a4afde17be05\ - a2735245f62e62efe32e79f335786e2e7cc56aa97bbed3ae7b0501846f02\ - 03010001"; - var msg = "Guillaume rocks!"; - - var cipherText = document.crypto.encryptAndSign(msg, PublicKey); - var sig = document.crypto.getSignature(); - var decrypted = document.crypto.decryptAndCheckSignature(cipherText, PrivateKey); - alert(decrypted); -} -window.onload=alert(document.crypto.getVersion());; -</script> -</head> -<body> -<applet name="crypto" code="name.styblo.cryptoapplet.CryptoApplet" archive="cryptoapplet.jar" mayscript="true" height="0" width="0"> -<param name="debug" value="true"> -<param name="raiseExceptions" value="false"> - No Java support for APPLET!! -</applet> -</body></html> |
