org.tranche.hash
Class Base16

java.lang.Object
  extended by org.tranche.hash.Base16

public final class Base16
extends java.lang.Object

Author:
Jayson Falkner - jfalkner@umich.edu

Constructor Summary
Base16()
           
 
Method Summary
static byte[] decode(java.lang.String string)
          Decode a string into its Base16 byte representation equivalent.
static byte decodeCharacter(char c)
          Decode a single ASCII character encoded in Base16 to its byte represenation.
static java.lang.String encode(byte[] bytes)
          Encode an array of bytes into its Base16 ASCII character string equivalent.
static char encodeByte(byte b)
          Encode a single byte into its Base16 equivalent ASCII represenation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Base16

public Base16()
Method Detail

encode

public static final java.lang.String encode(byte[] bytes)
Encode an array of bytes into its Base16 ASCII character string equivalent.

Parameters:
bytes -
Returns:
String encoded from the array of bytes

decode

public static final byte[] decode(java.lang.String string)
Decode a string into its Base16 byte representation equivalent.

Parameters:
string -
Returns:
Array of bytes decoded from string

decodeCharacter

public static final byte decodeCharacter(char c)
Decode a single ASCII character encoded in Base16 to its byte represenation.

Parameters:
c -
Returns:
Byte representation of the ASCII character being decoded.

encodeByte

public static final char encodeByte(byte b)
Encode a single byte into its Base16 equivalent ASCII represenation.

Parameters:
b -
Returns:
ASCII character representation of the byte being encoded.


This code is free for use both commercially and non-commercially as stated in the project's license