Hi,first of all, hello everyone. Im pretty new in gnu-classpath'ing but i found it pretty interesting and an awesome project, so,
its possible to compile (natively) an application wich uses gnu-crypto? Whenever i try to compile a simple test i get:RSA2.java:(.text+0x25): undefined reference to `gnu::crypto::jce::GnuCrypto::class$' RSA2.java:(.text+0x35): undefined reference to `gnu::crypto::jce::GnuCrypto::GnuCrypto()'
wich i suppose is because i have not any of the so's of gnu-crypto and im unable to get them by compiling gnu-crypto or classpath by myself.
Steps i made: 1 - Class: import java.security.KeyPairGenerator; import java.security.NoSuchAlgorithmException; import java.security.KeyPair; import java.security.Security; import gnu.crypto.key.rsa.RSAKeyPairGenerator; import gnu.crypto.key.rsa.GnuRSAKey; public class RSA2 {public static void main(String[] args) throws NoSuchAlgorithmException {
long t = System.currentTimeMillis(); Security.addProvider(new gnu.crypto.jce.GnuCrypto()); KeyPairGenerator keygen = null; try { keygen = KeyPairGenerator.getInstance("RSA"); } catch (NoSuchAlgorithmException e) { // TODO Auto-generated catch block e.printStackTrace(); } keygen.initialize(1024); for (int i=0;i<10;i++) { // KeyPair keyPair = keygen.generateKeyPair(); // System.out.println(keyPair.getPublic()); // System.out.println(keyPair.getPrivate()); } long tiempo = System.currentTimeMillis()-t; float n = 10; float ratio = n/ tiempo; System.out.println("tiempo = " + ratio); } } 2 - Compile:gcj -v --Main=RSA2 -o RSA2 --CLASSPATH="/usr/share/java/gnu-crypto.jar" RSA2.o
Anyway, gij runs RSA2 fine. Regards. -- ----------------------------------- Daniel Franganillo Corrales ----------------------------------- e-mail: danielf@xxxxxxxxxxxxxxxxxxx ----------------------------------- CriptoLab. Despacho 5212. Facultad de Informática. Campus de Montegancedo S/N Universidad Politécnica de Madrid. Boadilla del Monte. Madrid (Spain) -----------------------------------
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature