Blackbird
Class WK

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

public class WK
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 WK.EncryptionControlPanel
           
 
Field Summary
static java.lang.String strClassID
           
 
Fields inherited from interface Blackbird.EncryptionEntity
strBBCodeSelect, strFlatSelect, strHTMLSelect
 
Constructor Summary
WK(int x)
           
 
Method Summary
 java.lang.String decrypt(java.lang.String strArgList)
          This is the decrypt call at the topmost level of this class, that is called from the top level decrypt call in the applet, which is called back from the Eval applied to the JavaScript code.
 byte[] encrypt(long lFirmCode, long lUserCode, java.lang.String strToEncrypt)
          This is the direct call into the WibuKey API for Encryption
 java.lang.String getClassID()
          Return the class identification string.
 int getIndex()
          Every class has an index when instantiated in the main applet.
 java.lang.String getJavaScriptCode()
          Anonymous JavaScript function called up by the applet and handed to a JSObject eval function call.
 java.awt.MenuItem[] getMenuItems()
          When the applet loads, it "asks" each class for menu items to diplay in a richt-click launched menu.
 int getOPCode(java.lang.String s)
          Invoked by actions on the applet pertaining to menu choices, this class will return a code based on the string given that further determines what the applet does next.
 java.util.Vector getSerialNumbers(long lhwkbsys)
          This function will gather up the connected WibuKey Serial Numbers.
 void killPanel()
          This is invoked by the panels themeselves to dispose when no longer needed.
 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 WibuKey Encryption
 boolean setPasswordExternally(java.lang.String p)
          There is currently no external key or initialization vector in WibuKey implemented.
 void showEncryptionControlPanel(int i, java.awt.Image iconImage, java.lang.Object o)
          Part of the interface, this function will, based on the value of i, determin which of this classes control panels are shown.
 boolean testRuntime()
          This is called up when the class is built, and is for seeing if there is a WibuKey runtime installed or of any WibuKeys are plugged into the client machine.
 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

WK

public WK(int x)
Method Detail

killPanel

public void killPanel()
This is invoked by the panels themeselves to dispose when no longer needed.

Specified by:
killPanel in interface EncryptionEntity

encrypt

public byte[] encrypt(long lFirmCode,
                      long lUserCode,
                      java.lang.String strToEncrypt)
This is the direct call into the WibuKey API for Encryption

Parameters:
lFirmCode -
lUserCode -
strToEncrypt -
Returns:

testRuntime

public boolean testRuntime()
This is called up when the class is built, and is for seeing if there is a WibuKey runtime installed or of any WibuKeys are plugged into the client machine.

Specified by:
testRuntime in interface EncryptionEntity
Returns:

getSerialNumbers

public java.util.Vector getSerialNumbers(long lhwkbsys)
This function will gather up the connected WibuKey Serial Numbers. Not entirely necessary but informative.

Parameters:
lhwkbsys -
Returns:

getJavaScriptCode

public java.lang.String getJavaScriptCode()
Anonymous JavaScript function called up by the applet and handed to a JSObject eval function call.

Specified by:
getJavaScriptCode in interface EncryptionEntity
Returns:

getMenuItems

public java.awt.MenuItem[] getMenuItems()
When the applet loads, it "asks" each class for menu items to diplay in a richt-click launched menu.

Specified by:
getMenuItems in interface EncryptionEntity
Returns:

getIndex

public int getIndex()
Every class has an index when instantiated in the main applet.

Specified by:
getIndex in interface EncryptionEntity
Returns:

showEncryptionControlPanel

public void showEncryptionControlPanel(int i,
                                       java.awt.Image iconImage,
                                       java.lang.Object o)
Part of the interface, this function will, based on the value of i, determin which of this classes control panels are shown.

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

getOPCode

public int getOPCode(java.lang.String s)
Invoked by actions on the applet pertaining to menu choices, this class will return a code based on the string given that further determines what the applet does next.

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

setPasswordExternally

public boolean setPasswordExternally(java.lang.String p)
There is currently no external key or initialization vector in WibuKey implemented.

Specified by:
setPasswordExternally in interface EncryptionEntity
Parameters:
p -
Returns:

decrypt

public java.lang.String decrypt(java.lang.String strArgList)
This is the decrypt call at the topmost level of this class, that is called from the top level decrypt call in the applet, which is called back from the Eval applied to the JavaScript code.

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 WibuKey Encryption

Specified by:
setID in interface EncryptionEntity
Parameters:
sid -