net.sourceforge.openstego.util
Class StringUtil

java.lang.Object
  extended bynet.sourceforge.openstego.util.StringUtil

public class StringUtil
extends Object

Utility class to manipulate strings


Constructor Summary
StringUtil()
           
 
Method Summary
static String getHexString(byte[] raw)
          Method to convert byte array to hexadecimal string
static List getStringLines(String input)
          Method to tokenize a string by line breaks
static long passwordHash(String password)
          Method to get the long hash from the password.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringUtil

public StringUtil()
Method Detail

getHexString

public static String getHexString(byte[] raw)
Method to convert byte array to hexadecimal string

Parameters:
raw - Raw byte array
Returns:
Hex string

passwordHash

public static long passwordHash(String password)
Method to get the long hash from the password. This is used for seeding the random number generator

Parameters:
password - Password to hash
Returns:
Long hash of the password

getStringLines

public static List getStringLines(String input)
                           throws OpenStegoException
Method to tokenize a string by line breaks

Parameters:
input - Input string
Returns:
List of strings tokenized by line breaks
Throws:
OpenStegoException


Copyright © 2007-2008 Samir Vaidya. All Rights Reserved.