Class Key

Object
Key

public class Key extends Object
  • Field Details

  • Constructor Details

    • Key

      public Key(String name, String key, String type)
      Constructor for Key.
      Parameters:
      name - name of the user the Key corresponds to
      key - the meat of the encryption. A number for Caesar Cipher or an alphabet for a substitution cipher
      type - single character string representing type of cipher. C for Caesar Cipher and S for substitution cipher.
  • Method Details

    • getName

      public String getName()
      Gets and returns the Key's name, which represents the name of the user associated with it.
      Returns:
      String name
    • getKey

      public String getKey()
      Gets and returns the Key's key, which is a number for Caesar Cipher or an alphabet for a substitution cipher
      Returns:
      String key
    • getType

      public String getType()
      Gets and returns the Key's type, C for Caesar Cipher or S for substitution cipher.
      Returns:
      String type