Using javax.crypto library

Hi,

I want to port a Java .class to J#. I tried to use jbimp, because my final goal is to consumate that library in C#, but it gave me a lot of errors. I'm aware that J# uses JDK 1.1.4 libraries, but I want to know if it is possible to use newer classes with it without reimplementing all the libraries. I've read about some "runtime bridges", but I'm not wishing to use commertial products, as I'm doing a college research.

By the way, if someone is curious about it, I'm wanting to do a class that automates the process of logging into a Linux box using SSH, and execute something. I've tried Granados (a SSH connection class, opensource, C#), but it got a lot of problems, so I was trying to use JSch, wich is very good, but is Java. Can someone help me

Thanks.

Regards,

Bruno Saboia de Albuquerque

PS: Sorry about my bad english, I'm brazilian.



Answer this question

Using javax.crypto library

  • PhilMatt

    Thanks, Varun. In fact, I don't really want to use those bridges, since my goal is to use .NET code. I just wish a way to use .class files the way we use .dll files. It would be a "leap ahead" from Microsoft towards .NET dominance.


  • Aders

    Though we dont endorse any of these runtime bridges, however we believe that there are some solutions like JNBridge, J-Integra etc which might be tried by some of our customers.

    I'm not aware of any other ways of using JDK classes that are not implemented in J# to be used in J# solutions.

    Btw, you can refer to following link: http://msdn.microsoft.com/library/default.asp url=/library/en-us/dnpag/html/jdni.asp

    Thanks,

    Varun



  • Gary Short

    I tried to compile JSch using Visual J# and achieved it. I uploaded to the following page.

    http://sourceforge.net/project/showfiles.php group_id=151482&package_id=187606

    Be notice, so what I did is only compiling it and this release is not tested well. So I don't know whether it works or not.

    YUI, you have to execute the following two lines before using .NET ported JSch in order to set BouncyCastle as a default security provider.

    java.security.Security.removeProvider("Microsoft Provider");

    java.security.Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider());


  • Using javax.crypto library