Tutorial :Java z-base-32 encoding algorithm


I'm searching for an implementation of z-base-32 enc algo in java, any suggestions? (encoding and decoding)


Ok, I felt I had to give this a shot. I translated the C# implementation from My Ten Pennies to Java, and an example and source an be downloaded from here. It's not especially good looking code, but hey - it hopefully does it's work.

I haven't had time to test it thoroughly, but my short tests work fine.


import se.welcomweb.utils.zbase32j;    public class TestZBase32J {        public static void main(String ... args) {            ZBase32j zbase = new ZBase32j();            String message = "Hello, world!";          String encoded = zbase.encode(message);          System.out.println("Encoded: " + encoded);            String decoded = zbase.decode(encoded);          System.out.println("Decoded: " + decoded);        }    }  


I didn't compare but it looks like the Base32 we use here. Here is the original code,


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »