Package com.openstego.desktop.util
Class StringUtil
- java.lang.Object
-
- com.openstego.desktop.util.StringUtil
-
public class StringUtil extends Object
Utility class to manipulate strings
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
getHexString(byte[] raw)
Method to convert byte array to hexadecimal stringstatic List<String>
getStringLines(String input)
Method to tokenize a string by line breaksstatic long
passwordHash(String password)
Method to get the long hash from the password.
-
-
-
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) throws OpenStegoException
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
- Throws:
OpenStegoException
-
getStringLines
public static List<String> 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
- Processing issues
-
-