Cryptlib with Java (or C#) on Windows

Filip Jurnečka <[email protected]>
Newsgroups gmane.comp.encryption.cryptlib
Message-ID <[email protected]>
Hi, is there some normal way of using cryptlib library with Java or C#?  
And preferably on Windows? I was trying to use the manual but I would  
probably need more detailed guide.

1) In the case of Java I added the cryptlib.jar and then tried to run  
following class:


import cryptlib.*;

public class Demo {

	public static void main(String[] args) {
		System.loadLibrary( "cl" ); // cryptlib library name
		try
		{
			crypt.Init();
			//Calls to cryptlib routines
			crypt.End();
		}
		catch( CryptException e )
		{
			// cryptlib returned an error
			e.printStackTrace();
		}
	}
}

which outputs following Exception:

Exception in thread "main" java.lang.UnsatisfiedLinkError: no cl in  
java.library.path
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1734)

And I have no idea, what to do with that.


2) In the case of C# I am unable to add the referenced cryptlib.dll, since  
in the distribution (3.4.0) I got, there is no such file. So I would  
assume the required dll file would be on of the only two other dlls,  
cl32.dll or cl64.dll. However, when trying to add that to the References  
of my project, I get following error:

A reference to *.dll could not be added. Please make sure that the file is  
accessible, and that it is a valid assembly or COM component.

I am sure the file is accessible and I have no idea how to check the  
latter.


If anyone would have experience with that and would be so kind to help, I  
would greatly appreciate it.

Thanks in advance.

_______________________________________________
Cryptlib mailing list
[email protected] via Mail: [email protected]
Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
http://news.gmane.org/gmane.comp.encryption.cryptlib
Posts from non-subscribed addresses are blocked to prevent spam, please
subscribe in order to post messages.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.