|
From: <pe...@us...> - 2004-01-09 16:34:44
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id
In directory sc8-pr-cvs1:/tmp/cvs-serv28313/src/java/org/neuclear/id
Modified Files:
NSTools.java SignedNamedCore.java
Log Message:
changed use of base36 encoding to base32 to ensure compatibility with other schemes.
Index: NSTools.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/NSTools.java,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** NSTools.java 7 Jan 2004 23:12:20 -0000 1.25
--- NSTools.java 9 Jan 2004 16:34:40 -0000 1.26
***************
*** 2,5 ****
--- 2,8 ----
* $Id$
* $Log$
+ * Revision 1.26 2004/01/09 16:34:40 pelle
+ * changed use of base36 encoding to base32 to ensure compatibility with other schemes.
+ *
* Revision 1.25 2004/01/07 23:12:20 pelle
* XMLSig now has various added features:
***************
*** 357,361 ****
dig.doFinal(output, 0);
! buffy.append(CryptoTools.formatAsBase36(output));
return buffy.toString();
}
--- 360,364 ----
dig.doFinal(output, 0);
! buffy.append(CryptoTools.encodeBase32(output));
return buffy.toString();
}
Index: SignedNamedCore.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/SignedNamedCore.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** SignedNamedCore.java 8 Jan 2004 23:39:06 -0000 1.9
--- SignedNamedCore.java 9 Jan 2004 16:34:40 -0000 1.10
***************
*** 2,5 ****
--- 2,8 ----
* $Id$
* $Log$
+ * Revision 1.10 2004/01/09 16:34:40 pelle
+ * changed use of base36 encoding to base32 to ensure compatibility with other schemes.
+ *
* Revision 1.9 2004/01/08 23:39:06 pelle
* XMLSignature can now give you the Signing key and the id of the signer.
***************
*** 278,282 ****
*/
private SignedNamedCore(final PublicKey pub){
! this.digest=CryptoTools.formatAsBase36(CryptoTools.digest(pub.getEncoded()));
this.name="neu:sha1:"+digest;
this.timestamp=System.currentTimeMillis();
--- 281,285 ----
*/
private SignedNamedCore(final PublicKey pub){
! this.digest=CryptoTools.encodeBase32(CryptoTools.digest(pub.getEncoded()));
this.name="neu:sha1:"+digest;
this.timestamp=System.currentTimeMillis();
***************
*** 292,296 ****
private SignedNamedCore(final PublicKey pub, final String encoded){
this.signer = new Identity(new SignedNamedCore(pub),pub);
! this.digest=CryptoTools.formatAsBase36(CryptoTools.digest(encoded.getBytes()));
this.name=signer.getName()+"!"+digest;
this.timestamp=System.currentTimeMillis();
--- 295,299 ----
private SignedNamedCore(final PublicKey pub, final String encoded){
this.signer = new Identity(new SignedNamedCore(pub),pub);
! this.digest=CryptoTools.encodeBase32(CryptoTools.digest(encoded.getBytes()));
this.name=signer.getName()+"!"+digest;
this.timestamp=System.currentTimeMillis();
***************
*** 309,313 ****
this.timestamp = timestamp.getTime();
this.encoded = encoded;
! this.digest=CryptoTools.formatAsBase36(CryptoTools.digest(encoded.getBytes()));
}
--- 312,316 ----
this.timestamp = timestamp.getTime();
this.encoded = encoded;
! this.digest=CryptoTools.encodeBase32(CryptoTools.digest(encoded.getBytes()));
}
***************
*** 316,320 ****
this.signer=null;//new Identity(this,Identity.getRootPK());
final byte[] encoded = Identity.getRootPK().getEncoded();
! this.digest=CryptoTools.formatAsBase36(CryptoTools.digest(encoded));
this.timestamp=System.currentTimeMillis();
this.encoded=new String(encoded);
--- 319,323 ----
this.signer=null;//new Identity(this,Identity.getRootPK());
final byte[] encoded = Identity.getRootPK().getEncoded();
! this.digest=CryptoTools.encodeBase32(CryptoTools.digest(encoded));
this.timestamp=System.currentTimeMillis();
this.encoded=new String(encoded);
|