Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2008
    Posts
    1
    Rep Power
    0

    Default javax.cypto package

    import javax.crypto.Cipher;

    public class CipherClass
    {
    public static void main(String[] args)
    {
    Cipher c=Cipher.getInstance("DES");
    }
    }

    Compiling this file gives me a java.security.NoSuchAlgorithmException. Kindly guide me. I'm using jdk 1.6.

  2. #2
    CaptainMorgan's Avatar
    CaptainMorgan is offline Moderator
    Join Date
    Dec 2007
    Location
    NewEngland, US
    Posts
    835
    Rep Power
    8

    Default

    You must use a try/catch statement surrounding your attempt at getting the Cipher instance. Your error message tells you about an Exception. ;)

    Welcome to the Java Forums! See you around. :)
    Vote for the new slogan to our beloved Java Forums! (closes on September 4, 2008)
    Want to voice your opinion on your IDE/Editor of choice? Vote now!
    Got a little Capt'n in you? (drink responsibly)

Similar Threads

  1. javax.microedition.io/ javax.bluetooth
    By ahtiven in forum New To Java
    Replies: 3
    Last Post: 01-13-2009, 03:54 PM
  2. JXL Package
    By gaya3 in forum Java Servlet
    Replies: 1
    Last Post: 05-23-2008, 10:03 AM
  3. Package Explorer
    By bilmeze in forum Eclipse
    Replies: 0
    Last Post: 04-04-2008, 09:57 AM
  4. javax.comm package for COM ports
    By valery in forum Advanced Java
    Replies: 1
    Last Post: 08-07-2007, 04:03 PM
  5. map javax.swing.text.Element to javax.swing.text.View
    By elizabeth in forum New To Java
    Replies: 1
    Last Post: 07-30-2007, 08:02 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •