Hello Gaston,
Hi, (sorry for my english, im from ARgentine :( )
Your english is fine!
i dont have a good understanding of cryptography or cipher...i
That's not the problem - it's much more fundamental...
Here is my code and my console output.
Like you see, my input and output are padded... what am i doing wrong!!??
--- 8< 8< 8< ---
byte[] input = "HOLA MMMMMMUNDO".getBytes();
--- 8< 8< 8< ---
byte[] output = new byte[cpt.length - unpad];
--- 8< 8< 8< ---
System.out.println("TEST " + input + " -- " + output);
TEST [EMAIL PROTECTED] -- [EMAIL PROTECTED]
That's as expected. The out you are seeing is '[' to indicate you're
printing an array. 'B' to indicate it's a byte-array, and "@?????" to
indicate the address in memory of the byte-array.
The "problem" is that Java does not do "auto-formatting" of byte-arrays
- so that System.out.println( byteArray ); does not produce the string
you expect. Instead, either do this:
System.out.println( new String(input) );
or print it manually:
for ( int i = 0; i < input.length; i++ )
{
System.out.print( input[ i ] );
} // for
System.out.println();
Try that,
Martin Egholm
_______________________________________________
gnu-crypto-discuss mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnu-crypto-discuss