Java 2 Útikalauz programozóknak 5.0

elte.java2_utikalauz5.math
RSAClient osztály

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Panel
              extended by java.applet.Applet
                  extended by elte.java2_utikalauz5.math.RSAClient
Megvalósított interfészek:
ActionListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible

public class RSAClient
extends Applet
implements ActionListener

RSA algoritmus segítségével kódoló demo-applet.

Egyszerű applet, ami a RSA algoritmus segítségével üzeneteket képes kódolni és visszakódolni. A titkos és a nyilvános kulcsokat az applet maga is tud generálni, de már meglévő kulcsok beolvasására is lehetőséget ad a program.

Mióta:
Java 2 Útikalauz programozóknak
Lásd még:
Szerializált forma
Forrásfájl:
RSAClient.java
Letöltés:
RSAClient.jar

Beágyazott típusok
(package private)  class RSAClient.Keys
           
(package private) static class RSAClient.RSA
           
 
java.applet.Applet osztálytól örökölt beágyazott típusok
Applet.AccessibleApplet
 
java.awt.Panel osztálytól örökölt beágyazott típusok
Panel.AccessibleAWTPanel
 
java.awt.Container osztálytól örökölt beágyazott típusok
Container.AccessibleAWTContainer
 
java.awt.Component osztálytól örökölt beágyazott típusok
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Mezők
private  Button decryptbutton
           
private  String decrypted
           
private  Button encryptbutton
           
private  BigInteger[] encrypted
           
private  Font f
           
private  Button generatebutton
           
private  RSAClient.Keys keys
           
private  String message
           
private  Label messagelabel
           
private  TextField privatekeyfield
           
private  Label privatekeylabel
           
private  TextField publickeyfield
           
private  Label publickeylabel
           
private static long serialVersionUID
          Verziószám.
private  Button setprivatebutton
           
private  Button setpublicbutton
           
private  Label statuslabel
           
private  TextArea textarea
           
private  Label titlelabel
           
 
java.awt.Component osztálytól örökölt mezők
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
java.awt.image.ImageObserver interfésztől örökölt mezők
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Konstruktorok
RSAClient()
           
 
Metódusok
 void actionPerformed(ActionEvent e)
           
 void doDecryption()
           
 void doEncryption()
           
 BigInteger[] getEncryptedText()
           
 void getKeys()
           
 void init()
           
 
java.applet.Applet osztálytól örökölt metódusok
destroy, getAccessibleContext, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus, start, stop
 
java.awt.Panel osztálytól örökölt metódusok
addNotify
 
java.awt.Container osztálytól örökölt metódusok
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate, validateTree
 
java.awt.Component osztálytól örökölt metódusok
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle
 
java.lang.Object osztálytól örökölt metódusok
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Mezők részletezése

serialVersionUID

private static final long serialVersionUID
Verziószám.

Lásd még:
Konstans mezőértékek

keys

private RSAClient.Keys keys

f

private Font f

message

private String message

decrypted

private String decrypted

encrypted

private BigInteger[] encrypted

titlelabel

private Label titlelabel

statuslabel

private Label statuslabel

messagelabel

private Label messagelabel

publickeylabel

private Label publickeylabel

privatekeylabel

private Label privatekeylabel

publickeyfield

private TextField publickeyfield

privatekeyfield

private TextField privatekeyfield

textarea

private TextArea textarea

encryptbutton

private Button encryptbutton

decryptbutton

private Button decryptbutton

generatebutton

private Button generatebutton

setpublicbutton

private Button setpublicbutton

setprivatebutton

private Button setprivatebutton
Konstruktorok részletezése

RSAClient

public RSAClient()
Metódusok részletezése

init

public void init()
Felüldefiniálja:
Applet osztály init metódusát

getKeys

public void getKeys()

getEncryptedText

public BigInteger[] getEncryptedText()

doEncryption

public void doEncryption()

doDecryption

public void doDecryption()

actionPerformed

public void actionPerformed(ActionEvent e)
Megvalósítja:
ActionListener interfész actionPerformed metódusát

Java 2 Útikalauz programozóknak 5.0