com.internationalnetwork.security
Class Memfrob

Object
  extended by com.internationalnetwork.security.Memfrob

public class Memfrob
extends Object

This class provides a static method that transforms data using the Memfrob obfuscation technique, typically used for the purpose of disguising binary data where strong encryption isn't required but some simple obfuscation is useful.

The word "frobnicate" is sometimes used to refer to this particular method of encryption, which simply performs an Exclusive Or on each byte with the number 42 (which is an interesting number if you're a fan of The Hitch Hiker's Guide To The Galaxy series by Douglas Adams).


Field Summary
static String VERSION
          Version number of this Package (read-only).
 
Method Summary
static byte[] frobnicate(byte... data)
          "Frobnicates" a binary data using the Memfrob technique.
static byte[] frobnicate(String message)
          "Frobnicates" a message using the Memfrob technique.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERSION

public static final String VERSION
Version number of this Package (read-only).

See Also:
Constant Field Values
Method Detail

frobnicate

public static byte[] frobnicate(byte... data)
"Frobnicates" a binary data using the Memfrob technique.

Parameters:
data - The bytes to "frobnicate"
Returns:
The "frobnicated" bytes as a byte[] array

frobnicate

public static byte[] frobnicate(String message)
"Frobnicates" a message using the Memfrob technique.

Parameters:
message - The string to "frobnicate"
Returns:
The "frobnicated" string as a byte[] array