|
From: <pe...@us...> - 2004-01-10 00:01:43
|
Update of /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/crypto
In directory sc8-pr-cvs1:/tmp/cvs-serv23245/src/java/org/neuclear/commons/crypto
Modified Files:
Base64.java
Log Message:
Implemented new Schema for Transfer*
Working on it for Exchange*, so far all Receipts are implemented.
Added SignedNamedDocument which is a generic SignedNamedObject that works with all Signed XML.
Changed SignedNamedObject.getDigest() from byte array to String.
The whole malarchy in neuclear-pay does not build yet. The refactoring is a big job, but getting there.
Index: Base64.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/crypto/Base64.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Base64.java 21 Nov 2003 04:43:41 -0000 1.2
--- Base64.java 10 Jan 2004 00:01:40 -0000 1.3
***************
*** 1,4 ****
--- 1,11 ----
/* $Id$
* $Log$
+ * Revision 1.3 2004/01/10 00:01:40 pelle
+ * Implemented new Schema for Transfer*
+ * Working on it for Exchange*, so far all Receipts are implemented.
+ * Added SignedNamedDocument which is a generic SignedNamedObject that works with all Signed XML.
+ * Changed SignedNamedObject.getDigest() from byte array to String.
+ * The whole malarchy in neuclear-pay does not build yet. The refactoring is a big job, but getting there.
+ *
* Revision 1.2 2003/11/21 04:43:41 pelle
* EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
***************
*** 217,220 ****
--- 224,237 ----
}
+ /**
+ * Encode a String as base64
+ *
+ * @param raw <code>byte[]<code> to be base64 encoded
+ * @return the <code>String<code> with encoded data
+ */
+ public static String encode(final String raw) {
+ return new String(org.bouncycastle.util.encoders.Base64.encode(raw.getBytes()));
+ // return encode(raw, Base64.getBase64WrapLength());
+ }
}
|