Permalink
Browse files

fixed library to assume JSCRYPTO_HOME variable

  • Loading branch information...
1 parent c4c3f70 commit 1f4037238216c8ffdb75ce6f4b5dc86a0e1cba98 @benadida committed Nov 13, 2010
Showing with 8 additions and 2 deletions.
  1. +4 −1 README
  2. +4 −1 bigint.js
View
5 README
@@ -1,2 +1,5 @@
-JavaScript crypto.
+JavaScript crypto.
+
+IMPORTANT: this library REQUIRES that a variable JSCRYPTO_HOME be set by an HTML file, indicating
+the complete path to the current directory
View
@@ -5,6 +5,9 @@
*
* This library is almost entirely re-written by Ben Adida (ben@adida.net)
* with a BigInt wrapper.
+ *
+ * IMPORTANT: this library REQUIRES that a variable JSCRYPTO_HOME be set by an HTML file, indicating
+ * the complete path to the current directory
*/
// A wrapper for java.math.BigInteger with some appropriate extra functions for JSON and
@@ -126,7 +129,7 @@ function check_applet() {
// add the applet
if (use_applet) {
- var applet_base = '/static/helios/helios/';
+ var applet_base = JSCRYPTO_HOME;
var applet_html = '<applet codebase="' + applet_base + '" mayscript name="bigint" code="bigint.class" width=1 height=1 id="bigint_applet"></applet>';
// var applet_html = '<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" name="bigint" width="1" height="1" codebase="http://java.sun.com/products/plugin/autodl/jinstall-1_5_0-windows-i586.cab#Version=1,5,0,0"> <param name="code" value="bigint.class"> <param name="codebase" value="' + applet_base + '"> <param name="archive" value="myapplet.jar"> <param name="type" value="application/x-java-applet;version=1.5.0"> <param name="scriptable" value="true"> <param name="mayscript" value="false"> <comment> <embed code="bigint.class" name="bigint" java_codebase="' + applet_base + '" width="1" height="1" scriptable="true" mayscript="false" type="application/x-java-applet;version=1.5.0" pluginspage="http://java.sun.com/j2se/1.5.0/download.html"> <noembed>No Java Support.</noembed> </embed> </comment> </object>';

0 comments on commit 1f40372

Please sign in to comment.