Guest User

Dictionary.java

a guest
Oct 18th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.56 KB | None | 0 0
  1. import java.math.BigInteger;
  2. import java.util.HashMap;
  3.  
  4. /*
  5.  *
  6.  * This class represents a HashMap like a dictionary: On the one side the clear text and on the other side the cipher text.
  7.  *
  8.  * @author mitosis
  9.  *
  10.  */
  11.  
  12. public class Dictionary {
  13.  
  14.  private HashMap<Integer, BigInteger> dictionary = new HashMap<Integer, BigInteger>();
  15.  
  16.  /**
  17.   *
  18.   */
  19.  
  20.  public void addEntry(int clearNumber, BigInteger cryptedNumber) {
  21.   dictionary.put(clearNumber, cryptedNumber);
  22.  }
  23.  
  24.  public HashMap<Integer, BigInteger> getDictionary() {
  25.   return dictionary;
  26.  
  27.  }
  28.  
  29. }
Advertisement
Add Comment
Please, Sign In to add comment