Java binding in progress...

This commit is contained in:
Mikaël Ates 2010-12-09 23:51:52 +01:00
parent acf552ff54
commit a50253579f
2 changed files with 11 additions and 11 deletions

View File

@ -2,7 +2,6 @@ import com.entrouvert.cryptic.*;
class Myclass{
public static void main(String[] arg){
//System.out.println("yo");
//System.out.println(System.getProperty("java.library.path"));
Clsig c = new Clsig(1024,80,300,0,0,0,5);
c.generateParameters();
@ -11,13 +10,12 @@ class Myclass{
PrimeOrderGroup g = new PrimeOrderGroup(256);
g.moreBases(5);
System.out.println("nbbases: " + g.getnbBases());
// System.out.println("g: " + g.getbases()); //Pb: getbases devrait retourner un tableau de int et pas une string. Si?
/* ZkpkSchnorr s = new ZkpkSchnorr(g.getBases(),3,g.getP());
// String[] bases = (String[])g.getbases();
// System.out.println("bases[1]: " + bases[1]);
ZkpkSchnorr s = new ZkpkSchnorr(g.getbases(),3,g.getp());
s.round1();
String q1 = "1234567890c";
String q2 = "1234567890b";
String q3 = "1234567890a";*/
// s.round2(g.order,"1234567890",(q1,q2,q3));
String[] quantities = { "1234567890c", "1234567890b", "1234567890a", };
s.round2(g.getorder(),"121212121212121212121212121",quantities);
// String dlrep = cryptic.getDlrep(3,(q1,q2,q3),g.bases,g.p);
// s2 = cryptic.ZkpkSchnorr(g.bases,3,g.p);
// int rc = s2.verifyInteractiveProof(dlrep,s.commitment,"1234567890",s.responses)

View File

@ -230,10 +230,10 @@ protected static native void destroy(long cptr);
if is_boolean(vtype):
return 'boolean'
############################
elif is_bn(vtype):
return 'String'
elif is_tabbn(vtype) or is_tabint(vtype):
return 'Object[]'
elif is_bn(vtype):
return 'String'
############################
elif is_int(vtype, self.binding_data):
return 'int'
@ -260,11 +260,13 @@ protected static native void destroy(long cptr);
return 'String'
# elif vtype in ('const GList*','GList*','GHashTable*'):
##################################"
elif vtype == 'BIGNUM*':
return 'String'
elif vtype in ('const GList*','GList*','GHashTable*', 'int*', 'BIGNUM**'):
##################################"
return 'Object[]'
##################################"
elif vtype == 'BIGNUM*':
return 'String'
##################################"
elif vtype == 'xmlNode*':
return 'String'
elif isinstance(vtype,basestring) and vtype.startswith('Cryptic'):