• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

problem in Handling BouncyCastle

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all,
I am little novice in developing the Security application. I am devloping an application in which i was supposed to Encrypt the data in the MIDlet side.
I am getting the fallowing Exception
java.lang.NoClassDefFoundError: java/security/SecureRandom: Cannot create class in system package
at org.bouncycastle.crypto.encodings.PKCS1Encoding.init(+35)
at Cryptor.doEncrypt(+64)
at BouncyTest$CryptCanvas.keyPressed(+45)
at javax.microedition.lcdui.Canvas.callKeyPressed(+19)
at javax.microedition.lcdui.Display$DisplayAccessor.keyEvent(+198)
at javax.microedition.lcdui.Display$DisplayManagerImpl.keyEvent(+11)
at com.sun.midp.lcdui.DefaultEventHandler.keyEvent(+121)
at com.sun.midp.lcdui.AutomatedEventHandler.keyEvent(+210)
at com.sun.midp.lcdui.DefaultEventHandler$QueuedEventHandler.run(+178)
Can anybody please tell me how come to include the SecureRandom in this MIDlet.I am unable to find the solution for this.
Please help me in this...
lakshman
 
Battula lakshman
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all,
I am using the proguard for obfuscation of the Application.AS obfuscator main goal was to decompile and removing the non using classes and including the classes the MIDlet needed.
As expected , i thought that Java.security.SecureRandom will include into the JAR after Obfuscation.
The Java.security.SecureRandom was available in the BouncyCastle, but it did not do anything instead, after running the application it was again giving the application which was little different from the previous one
java.lang.NoClassDefFoundError: java/security/a: Cannot create class in system package
at org.bouncycastle.crypto.encodings.a.a(+31)
at a.a(+64)
at b.keyPressed(+45)
at javax.microedition.lcdui.Canvas.callKeyPressed(+19)
at javax.microedition.lcdui.Display$DisplayAccessor.keyEvent(+198)
at javax.microedition.lcdui.Display$DisplayManagerImpl.keyEvent(+11)
at com.sun.midp.lcdui.DefaultEventHandler.keyEvent(+121)
at com.sun.midp.lcdui.AutomatedEventHandler.keyEvent(+210)
at com.sun.midp.lcdui.DefaultEventHandler$QueuedEventHandler.run(+178)
can you please tell me which will make the application to Encrypt the data by avoiding the Exception at present i am getting
Please rectify me, if i given any wrong information about obfuscators.
Thanks for your help
lakshman
 
Is this the real life? Is this just fantasy? Is this a tiny ad?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic