[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AW: [iaik-jce] Bug in method Util.encodeByteArray(byte[]) ????



Hello,

you are right; we will include a notice in the Javadoc. encodeByteArray
formats a base64 encoded byte array so that the string it represents can be
inserted in a Java source code.
Use method Util.Base64Encode for getting the raw base64 encoded byte array
or method toPemString for getting a base64-PEM-formattad string.

Regards,
Dieter Bratko

-----Ursprüngliche Nachricht-----
Von: iaik-jce-owner@iaik.tu-graz.ac.at
[mailto:iaik-jce-owner@iaik.tu-graz.ac.at]Im Auftrag von Andreas
Siglreithmayr
Gesendet: Donnerstag, 10. August 2000 13:57
An: IAIK MailingList (E-mail)
Betreff: [iaik-jce] Bug in method Util.encodeByteArray(byte[]) ????


Hello,

the method Util.encodeByteArray(byte[]) returns not a String that represents
the base64-Encoding of the Array.
I got something like that:

"MGExETAPBgNVBAcTCEludGVybmV0MRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjEz" +
"MDEGA1UECxMqVmVyaVNpZ24gQ29tbWVyY2lhbCBTb2Z0d2FyZSBQdWJsaXNoZXJz" +
"IENB";

instead of:

MGExETAPBgNVBAcTCEludGVybmV0MRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjEz
MDEGA1UECxMqVmVyaVNpZ24gQ29tbWVyY2lhbCBTb2Z0d2FyZSBQdWJsaXNoZXJz
IENB

So far I know a base64-Encoding doesn't enclose each line with quotes and
ends with plus.
If the purpose of the method is another it should be annoted in the javadoc
what the method returns exactly.

Bye

Andreas Siglreithmayr
Developer

memIQ AG
Hans-Pinsel-Strasse 9a
D-85540 Haar
Tel.: +49 (0)89 45639.325
http://www.memIQ.com
andreas.siglreithmayr@memIQ.de


--
Mailinglist-archive at
http://jcewww.iaik.at/mailarchive/iaik-jce/jcethreads.html

To unsubscribe send an email to listserv@iaik.at with the folowing content:
UNSUBSCRIBE iaik-jce




smime.p7s