I've been trying to use the pidCrypt[1] library from GWT. According to their AES description, what I need to do is this in JavaScript:
<code> var aes = new pidCrypt.AES.CBC(); var encrypted = aes.encryptText(plain, password, {nBits: 256}); </code> I've tried to create a simple GWT wrapper which has the following method defined: <code> public static native String Encrypt(String decryptedText, String password) /*-{ var aes = new $wnd.pidCrypt.AES.CBC(); return aes.encryptText(decryptedText, password, {nBits:256}); }-*/; </code> I've also included the required JS libraries in the module configuration file: <code> <script src="pidcrypt.js" /> <script src="pidcrypt_util.js"/> <script src="md5.js" /> <script src="aes_core.js" /> <script src="aes_cbc.js" /> </code> When I try to run this in GWT 1.5.3, I get the following error. com.google.gwt.core.client.JavaScriptException: (TypeError): Expected an object number: -2146823281 description: Expected an object at com.yoobits.ocs.client.RijndaelWrapper.Encrypt(Native Method) Any pointers on how to resolve this issue? Thanks, Trond Andersen [1]: http://www.pidder.com/pidcrypt/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---