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.
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
Re: Simple Encryption Program
What command are you using to compile your code?
Re: Simple Encryption Program
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
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?
Re: Simple Encryption Program
The <> brackets are shorthand for "fill in this bit".
They aren't part of the command.
Re: Simple Encryption Program
Quote:
Originally Posted by
Tolls
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.
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)