Results 1 to 9 of 9
  1. #1
    yasarqamar is offline Member
    Join Date
    Jul 2012
    Posts
    14
    Rep Power
    0

    Default Simple Encryption Program

    I'm using a very simple encryption program to generate a MD5 hash. I installed the Cryptix library correctly using the command line in Windows but when I try to compile my sample program the cmd gives an error that it could not find some packages from the library and the program fails to compile. I've correctly installed the library and even the compiler says that its already installed when I try to reinstall. Any leads will be much appreciated.

  2. #2
    yasarqamar is offline Member
    Join Date
    Jul 2012
    Posts
    14
    Rep Power
    0

    Default Re: Simple Encryption Program

    Here's what the cmd throws when I try to compile the program named MD5Sample.java:

    MD5Sample.java:3: error: package cryptix.util.core does not exist
    import cryptix.util.core.Hex;
    ^
    MD5Sample.java:4: error: package cryptix.provider.md does not exist
    import cryptix.provider.md.*;
    ^
    MD5Sample.java:29: error: package cryptix.util.core does not exist
    w = cryptix.util.core.Hex.dumpString(hash);
    ^
    3 errors

  3. #3
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,085
    Rep Power
    20

    Default Re: Simple Encryption Program

    What command are you using to compile your code?
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  4. #4
    yasarqamar is offline Member
    Join Date
    Jul 2012
    Posts
    14
    Rep Power
    0

    Default Re: Simple Encryption Program

    javac MD5Sample.java

  5. #5
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,085
    Rep Power
    20

    Default Re: Simple Encryption Program

    You need to have the cryptix jar files on the classpath:
    javac -cp<path to jars, including the jar name> MD5Sample.java

    You'll need that to run them as well:
    java -cp<etc etc> MD5Sample
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  6. #6
    yasarqamar is offline Member
    Join Date
    Jul 2012
    Posts
    14
    Rep Power
    0

    Default Re: Simple Encryption Program

    I tried compiling using the above command like this:

    C:\Program Files\Java\jdk1.7.0_04\cryptix32-20001002-r3.2.0> javac -cp<C:\Program Files\Java\jdk1.7.0_04\cryptix32-20001002-r3.2.0\cryptix32.jar> MD5Sample.java

    but the command line gives the following error even though the file is in the current directory:

    The system cannot find the file specified.

    On a related note, does anyone know whether Cryptix is compatible with Java jdk 1.7?

  7. #7
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,085
    Rep Power
    20

    Default Re: Simple Encryption Program

    The <> brackets are shorthand for "fill in this bit".
    They aren't part of the command.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  8. #8
    yasarqamar is offline Member
    Join Date
    Jul 2012
    Posts
    14
    Rep Power
    0

    Default Re: Simple Encryption Program

    Quote Originally Posted by Tolls View Post
    The <> brackets are shorthand for "fill in this bit".
    They aren't part of the command.
    I corrected the command but the compiler once again throws the original three errors that I posted above. Can anybody guess what's going wrong here? I'm clueless why it cannot find the classes when I have correctly installed the library already.

  9. #9
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,085
    Rep Power
    20

    Default Re: Simple Encryption Program

    So this is the command you execited?
    javac -cp C:\Program Files\Java\jdk1.7.0_04\cryptix32-20001002-r3.2.0\cryptix32.jar;. MD5Sample.java

    (I forgot the '.' before, but that would have given you a different error)
    Please do not ask for code as refusal often offends.

    ** This space for rent **

Similar Threads

  1. Replies: 0
    Last Post: 11-27-2011, 02:41 PM
  2. Simple program, simple problem
    By taymilll in forum New To Java
    Replies: 12
    Last Post: 06-20-2011, 05:12 AM
  3. Please help with simple program.. Very simple.
    By jonytek in forum New To Java
    Replies: 7
    Last Post: 02-14-2011, 12:44 AM
  4. simple program
    By blastoff in forum New To Java
    Replies: 5
    Last Post: 04-14-2010, 11:25 PM
  5. Very Simple Encryption
    By AndrewM16921 in forum New To Java
    Replies: 5
    Last Post: 03-24-2009, 01:00 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
  •