Inheritance diagram for CryptoUtils:
Collaboration diagram for CryptoUtils:Base class of all cryptographic and steganographic en- and decipherers with various required attributes and methods.
Public Methods | |
| Set< Character > | getAlphabet () |
| void | setAlphabet (char[] alphabet) |
| String | replaceAll (String toProcess) |
| Map< String, String > | getReplacements () |
Public Static Methods | |
| static char[] | getDefaultAlphabet () |
| static char[] | getDefaultAlphabetWithoutChar (char ch) |
| static char[] | getTrithemianAlphabet () |
| static Map< String, String > | trithemianAlphabetReplacements () |
Protected Methods | |
| boolean | checkAlphabet (String alphabetString, char[] defaultAlphabet) |
| boolean | checkReplacements (String replacementString) |
| void | checkWSDeletion (String deleteWhitespace) |
| boolean | checkIntKey (String intKeyString, int defaultKey) |
| String | getAlphabetAsStringKey (int start) |
Protected Attributes | |
| char[] | alphabet |
| Map< String, String > | replacementMap |
| int | intKey |
| boolean | deleteWhitespace |
| Logger | logger = Logger.getLogger(this.getClass()) |
| boolean checkAlphabet | ( | String | alphabetString, |
| char[] | defaultAlphabet | ||
| ) | [protected] |
Builds alphabet from specified string, if not null and not empty. Else the specified default alphabet will be set as alphabet.
| alphabetString | String to set as alphabet. |
| defaultAlphabet | default alphabet. |
| boolean checkIntKey | ( | String | intKeyString, |
| int | defaultKey | ||
| ) | [protected] |
Builds an integer key from the specified string.
| intKeyString | integer key as string |
| defaultKey | key to set if integer key could not be build from specified string. |
| boolean checkReplacements | ( | String | replacementString | ) | [protected] |
Builds replacement map from specified string that should be parsable CSV data.
| replacementString | replacements as csv data. |
| void checkWSDeletion | ( | String | deleteWhitespace | ) | [protected] |
If specified string equals true, whitespace will be deleted in the substituted text.
| deleteWhitespace | boolean value as string |
| Set<Character> getAlphabet | ( | ) |
Returns the alphabet of this crypto component.
| String getAlphabetAsStringKey | ( | int | start | ) | [protected] |
Returns the alphabet as string key (starts from the specified position, e.g. 1 for a).
| start | Position of the alphabet to start. |
| static char [] getDefaultAlphabet | ( | ) | [static] |
Returns the default alphabet (a-z), lower case letters.
| static char [] getDefaultAlphabetWithoutChar | ( | char | ch | ) | [static] |
Returns the default alphabet (a-z) without the specified character. Needed e.g. to get 25 letters for a 5 * 5 matrix.
| ch | character to ignore. |
| Map<String, String> getReplacements | ( | ) |
| static char [] getTrithemianAlphabet | ( | ) | [static] |
Returns the Trithemian alphabet: abcdefghiklmnopqrstuxyzw.
| String replaceAll | ( | String | toProcess | ) |
Replaces characters of the specified string by the replacements set in this.
| toProcess | String to process. |
| void setAlphabet | ( | char[] | alphabet | ) |
Sets the alphabet of this crypto component.
| alphabet | to set. |
| static Map<String,String> trithemianAlphabetReplacements | ( | ) | [static] |
Returns a map of default alphabet values and their replacements in the T. alphabet.
char [] alphabet [protected] |
boolean deleteWhitespace [protected] |
int intKey [protected] |
Logger logger = Logger.getLogger(this.getClass()) [protected] |
Map<String,String> replacementMap [protected] |