Class StringUtil
java.lang.Object
com.openstego.desktop.util.StringUtil
Utility class to manipulate strings
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
getHexString
(byte[] raw) Method to convert byte array to hexadecimal stringgetStringLines
(String input) Method to tokenize a string by line breaksstatic boolean
isNullOrEmpty
(String val) Checks whether the given string is null or emptystatic long
passwordHash
(String password) Method to get the long hash from the password.
-
Method Details
-
getHexString
Method to convert byte array to hexadecimal string- Parameters:
raw
- Raw byte array- Returns:
- Hex string
-
passwordHash
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
Method to tokenize a string by line breaks- Parameters:
input
- Input string- Returns:
- List of strings tokenized by line breaks
- Throws:
OpenStegoException
-
isNullOrEmpty
Checks whether the given string is null or empty- Parameters:
val
- Input string- Returns:
- flag
-