On Wed, Oct 31, 2012 at 6:59 AM, artmel <tw4...@gmail.com> wrote: > I am working on an Android project in Eclipse that uses encryption. The > code contains the following line: > > Cipher en = Cipher.getInstance("AES/ECB/NOPADDING"); > > Eclipse complains about the line of code with: "Unhandled exception type > NoSuchAlgorithmException" and "Unhandled exception type > NoSuchPaddingException". >
yes, because CIpher.geIntance can throw throw those two checked exceptions, so you program has to deal with them. > I wrote a simple encrypt/decrypt java program with a text editor outside > Eclipse that contained that line of code. The program compiled and ran from > the command line correctly, didn't throw any exceptions, and encrypted and > decrypted properly. > javac from the command like is going to make you either catch or declare these exceptions as well. This tells me that there is a provider properly installed on the machine > that supports that algorithm and padding but for some reason Eclipse > doesn't see or cant find some necessary file. I've tried looking through > various directories and changed Eclipse's search paths several times with > no luck. Any ideas? > this doesn't seem to have anything to do with eclipse, just your lack of catching these exceptions or declaring that they are thrown. -bri > <http://stackoverflow.com/questions/tagged/android> > > -- > You received this message because you are subscribed to the Google Groups > "Android Security Discussions" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/android-security-discuss/-/frMJ9lmk_7gJ. > To post to this group, send email to > android-security-discuss@googlegroups.com. > To unsubscribe from this group, send email to > android-security-discuss+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/android-security-discuss?hl=en. > -- You received this message because you are subscribed to the Google Groups "Android Security Discussions" group. To post to this group, send email to android-security-discuss@googlegroups.com. To unsubscribe from this group, send email to android-security-discuss+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/android-security-discuss?hl=en.