org.tentackle.util
Class DefaultObfuscator

java.lang.Object
  extended by org.tentackle.util.DefaultObfuscator

public class DefaultObfuscator
extends Object

A very simple string obfuscator.

Author:
harald

Constructor Summary
DefaultObfuscator()
           
 
Method Summary
static CharConverter createObfuscator(char salt)
          Creates an obfuscating CharConverter.
static void main(String[] args)
          Command line tool to obfuscate a string.
static char[] obfuscate(char[] input, char salt)
          Obfuscates a character array.
We return using this instead of md5sum whenever the length of the obfuscated string must be the same as the input string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultObfuscator

public DefaultObfuscator()
Method Detail

obfuscate

public static char[] obfuscate(char[] input,
                               char salt)
Obfuscates a character array.
We return using this instead of md5sum whenever the length of the obfuscated string must be the same as the input string. Obfuscation is *NOT* the preferred method for passwords! Use md5sum instead.

Parameters:
input - is the input array of chars to obfuscate
salt - the salt to start with
Returns:
the obfuscated array

createObfuscator

public static CharConverter createObfuscator(char salt)
Creates an obfuscating CharConverter.

Parameters:
salt - the salt to start with
Returns:
the converter

main

public static void main(String[] args)
Command line tool to obfuscate a string.



Copyright © 2001-2008 Harald Krake, Bergstr. 48, 78098 Triberg, Germany, harald@krake.de