Class Base32

java.lang.Object
org.archive.util.Base32

public class Base32 extends Object
Base32 - encodes and decodes RFC3548 Base32 (see http://www.faqs.org/rfcs/rfc3548.html ) Imported public-domain code of Bitzi.
Author:
Robert Kaye, Gordon Mohr
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static byte[]
    decode(String base32)
    Decodes the given Base32 String to a raw byte array.
    static String
    encode(byte[] bytes)
    Encodes byte array to Base32 String.
    static void
    main(String[] args)
    For testing, take a command-line argument in Base32, decode, print in hex, encode, print

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Base32

      public Base32()
  • Method Details

    • encode

      public static String encode(byte[] bytes)
      Encodes byte array to Base32 String.
      Parameters:
      bytes - Bytes to encode.
      Returns:
      Encoded byte array bytes as a String.
    • decode

      public static byte[] decode(String base32)
      Decodes the given Base32 String to a raw byte array.
      Parameters:
      base32 -
      Returns:
      Decoded base32 String as a raw byte array.
    • main

      public static void main(String[] args)
      For testing, take a command-line argument in Base32, decode, print in hex, encode, print
      Parameters:
      args -