Пример #1
0
  /**
   * Constructs a SPEED cipher object, in the UNINITIALIZED state. This calls the Cipher constructor
   * with <i>implBuffering</i> false, <i>implPadding</i> false and the provider set to "Cryptix".
   */
  public SPEED() {
    super(false, false, "Cryptix");
    link();

    try {
      String ps = Security.getAlgorithmProperty("SPEED", "rounds");
      if (ps != null) setRounds(Integer.parseInt(ps));
    } catch (Exception e) {
      if (DEBUG && debuglevel > 0) debug("Could not set number of rounds");
    }
    try {
      String ps = Security.getAlgorithmProperty("SPEED", "blockSize");
      if (ps != null) setBlockSize(Integer.parseInt(ps));
    } catch (Exception e) {
      if (DEBUG && debuglevel > 0) debug("Could not set block size");
    }
  }