Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Encryption

    Hello all,

    we are using smart GWT 2.2 with FF 3.6 as our front end. i need to do password encrytion in this.Before smart GWT we were using GWT Ext and the encryption was done using gwt-crypto.jar.Which jar is needed to do encrytion in smart GWT.

    Thanks in advance.

    #2
    There is nothing special in regard to this with Smart GWT and you should still be able to use gwt-crypto.jar in the same way.

    Comment


      #3
      Thanks for your reply.

      Actually, I'm using gwt-crypto.jar. I'm able to successfully encrypt a String but when i try to decrypt it, it throws this Exception:

      Code:
       com.googlecode.gwt.crypto.bouncycastle.InvalidCipherTextException: pad block corrupted
      	at com.googlecode.gwt.crypto.bouncycastle.paddings.PKCS7Padding.padCount(PKCS7Padding.java:68)
      	at com.googlecode.gwt.crypto.bouncycastle.paddings.PaddedBufferedBlockCipher.doFinal(PaddedBufferedBlockCipher.java:295)
      	at com.googlecode.gwt.crypto.client.TripleDesCipher.decrypt(TripleDesCipher.java:55)
      	at com.nextenders.client.util.other.EncryptionUtil.decrypt(EncryptionUtil.java:50)
      	at com.nextenders.client.ui.triad.view.EditUserPanel.setFormData(EditUserPanel.java:132)
      	at com.nextenders.client.ui.triad.view.panels.MasterPanel.doOnGridRowClick(MasterPanel.java:185)
      	at com.nextenders.client.ui.triad.smartgrid.SettingsGrid.doOnRowClick(SettingsGrid.java:127)
      	at com.nextenders.client.ui.triad.smartgrid.UserGrid.doOnRowClick(UserGrid.java:128)
      	at com.nextenders.client.ui.triad.smartgrid.SmartSuperGrid$2.onRecordClick(SmartSuperGrid.java:132)
      	at com.smartgwt.client.widgets.grid.events.RecordClickEvent.dispatch(RecordClickEvent.java:96)
      	at com.smartgwt.client.widgets.grid.events.RecordClickEvent.dispatch(RecordClickEvent.java:1)
      	at com.google.gwt.event.shared.HandlerManager$HandlerRegistry.fireEvent(HandlerManager.java:65)
      	at com.google.gwt.event.shared.HandlerManager$HandlerRegistry.access$1(HandlerManager.java:53)
      	at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:178)
      	at com.smartgwt.client.widgets.BaseWidget.fireEvent(BaseWidget.java:67)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      	at java.lang.reflect.Method.invoke(Unknown Source)
      	at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
      	at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
      	at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157)
      	at com.google.gwt.dev.shell.BrowserChannel.reactToMessagesWhileWaitingForReturn(BrowserChannel.java:1713)
      	at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:165)
      	at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:120)
      	at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:507)
      	at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:264)
      	at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
      	at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
      	at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:188)
      	at sun.reflect.GeneratedMethodAccessor508.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      	at java.lang.reflect.Method.invoke(Unknown Source)
      	at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
      	at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
      	at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157)
      	at com.google.gwt.dev.shell.BrowserChannel.reactToMessages(BrowserChannel.java:1668)
      	at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:401)
      	at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:222)
      	at java.lang.Thread.run(Unknown Source)
      So it will be good if someone can help me to solve this.

      Comment


        #4
        There's no indication its related to Smart GWT.

        Comment


          #5
          Hello,
          SmarGWT.dev, you were right. My thinking was wrong. It had nothing to do with GWT-Ext or SmartGWT. So my efforts were also in wrong directions. The actual prob was something else. But Thank u very very much for ur answer as it helped me out to come out from a wrong direction.

          Comment

          Working...
          X