org.apache.fulcrum.jce.crypto
Class HexConverter

java.lang.Object
  extended by org.apache.fulcrum.jce.crypto.HexConverter

public final class HexConverter
extends java.lang.Object

Helper class to for HEX conversion. The code uses parts from Markus Hahn's Blowfish library found at http://blowfishj.sourceforge.net/

Author:
Siegfried Goeschl , Markus Hahn

Constructor Summary
HexConverter()
           
 
Method Summary
static byte[] toBytes(java.lang.String data)
          Converts a hex string into a byte[]
static java.lang.String toString(byte[] data)
          Converts a byte array to a hex string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HexConverter

public HexConverter()
Method Detail

toString

public static final java.lang.String toString(byte[] data)
Converts a byte array to a hex string.

Parameters:
data - the byte array
Returns:
the hex string

toBytes

public static final byte[] toBytes(java.lang.String data)
Converts a hex string into a byte[]

Parameters:
data - the hex string
Returns:
the byte[]


Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.