Blackbird
Class ROT13

java.lang.Object
  extended by Blackbird.ROT13
All Implemented Interfaces:
EncryptionEntity

public class ROT13
extends java.lang.Object
implements EncryptionEntity

Blackbird Encryption Project.
Copyright 2008 Blackbird Encryption Project - www.ravenproject.us

   This file is part of Blackbird.

Blackbird is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Blackbird is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Blackbird. If not, see <http://www.gnu.org/licenses/>.
Changes


Nested Class Summary
 class ROT13.EncryptionControlPanel
           
 
Field Summary
static java.lang.String strClassID
           
 
Fields inherited from interface Blackbird.EncryptionEntity
strBBCodeSelect, strFlatSelect, strHTMLSelect
 
Constructor Summary
ROT13(int x)
           
 
Method Summary
 java.lang.String decrypt(java.lang.String strArgList)
          This is the upper level decrypt call into this class.
 byte[] encrypt(byte[] b)
          This is ROT13s encryption function that, as expected is quite simple.
 java.lang.String getClassID()
          Return the class identification string.
 int getIndex()
          Return the assigned index of this class.
 java.lang.String getJavaScriptCode()
          This function is very important.
 java.awt.MenuItem[] getMenuItems()
          When the applet launches, each class that is created is queried for its own menu items that are needed to use the control panels.
 int getOPCode(java.lang.String s)
          Opecode is returned to tell the main applet which part of this class' control panels to launch.
 void killPanel()
          Internally, there is only one panel to kill, the one used for encryption.
 java.lang.String parseID(java.lang.String arglist)
          parseID is used by those entities that need to single out an Identifier string needed by a using class to find out "who" created the encryption entry.
 void setFrameTarget(int i)
          setFrameTarget is used to set a variable that is concated in the Javascript generation function that is set pertaining to the "position" the applet resides in the DOM.
 void setID(java.lang.String sid)
          Not used in ROT13
 boolean setPasswordExternally(java.lang.String p)
           
 void showEncryptionControlPanel(int i, java.awt.Image iconImage, java.lang.Object o)
          Generic function taking arguments that can direct it to display more than one kind of control panel.
 boolean testRuntime()
          This function always returns true, as there is no third party runtime.
 boolean usesPWIVector()
          Some Encryption entities use passwords or initialization vectors.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

strClassID

public static final java.lang.String strClassID
See Also:
Constant Field Values
Constructor Detail

ROT13

public ROT13(int x)
Method Detail

encrypt

public byte[] encrypt(byte[] b)
This is ROT13s encryption function that, as expected is quite simple.

Parameters:
b -
Returns:

getJavaScriptCode

public java.lang.String getJavaScriptCode()
This function is very important. The applet uses it to get the JavaScript code against which to try an eval function. This code calls back into the applet.

Specified by:
getJavaScriptCode in interface EncryptionEntity
Returns:

showEncryptionControlPanel

public void showEncryptionControlPanel(int i,
                                       java.awt.Image iconImage,
                                       java.lang.Object o)
Generic function taking arguments that can direct it to display more than one kind of control panel. ROT13 only has one panel.

Specified by:
showEncryptionControlPanel in interface EncryptionEntity
Parameters:
i -
iconImage -
o -

getMenuItems

public java.awt.MenuItem[] getMenuItems()
When the applet launches, each class that is created is queried for its own menu items that are needed to use the control panels.

Specified by:
getMenuItems in interface EncryptionEntity
Returns:

getIndex

public int getIndex()
Return the assigned index of this class.

Specified by:
getIndex in interface EncryptionEntity
Returns:

killPanel

public void killPanel()
Internally, there is only one panel to kill, the one used for encryption.

Specified by:
killPanel in interface EncryptionEntity

getOPCode

public int getOPCode(java.lang.String s)
Opecode is returned to tell the main applet which part of this class' control panels to launch.

Specified by:
getOPCode in interface EncryptionEntity
Parameters:
s -
Returns:

testRuntime

public boolean testRuntime()
This function always returns true, as there is no third party runtime.

Specified by:
testRuntime in interface EncryptionEntity
Returns:

setPasswordExternally

public boolean setPasswordExternally(java.lang.String p)
Specified by:
setPasswordExternally in interface EncryptionEntity

decrypt

public java.lang.String decrypt(java.lang.String strArgList)
This is the upper level decrypt call into this class. Because ROT13 takes only the byte array string as a single argument, there is only the processing of the array.

Specified by:
decrypt in interface EncryptionEntity
Parameters:
strArgList -
Returns:

setFrameTarget

public void setFrameTarget(int i)
setFrameTarget is used to set a variable that is concated in the Javascript generation function that is set pertaining to the "position" the applet resides in the DOM. What is meant by "Frame Target" is the name of the frame, derived from the frames Name parameter that the applet must invoke Javascript callback results into.

Specified by:
setFrameTarget in interface EncryptionEntity
Parameters:
i -

getClassID

public java.lang.String getClassID()
Return the class identification string.

Specified by:
getClassID in interface EncryptionEntity
Returns:

usesPWIVector

public boolean usesPWIVector()
Some Encryption entities use passwords or initialization vectors. Using programs may need to know that in some cases.

Specified by:
usesPWIVector in interface EncryptionEntity
Returns:

parseID

public java.lang.String parseID(java.lang.String arglist)
parseID is used by those entities that need to single out an Identifier string needed by a using class to find out "who" created the encryption entry. This is not needed by those classes that need not single out an encryption entry for a particuler initialization vector or password. Different classes that use this might have this Identifier is different parts of comma-delimited listing.

Specified by:
parseID in interface EncryptionEntity
Parameters:
arglist -
Returns:

setID

public void setID(java.lang.String sid)
Not used in ROT13

Specified by:
setID in interface EncryptionEntity
Parameters:
sid -