示例#1
0
    public void init(boolean forEncryption, CipherParameters params)
        throws IllegalArgumentException {
      byte[] k = Arrays.clone(((KeyParameter) params).getKey());

      DESedeParameters.setOddParity(k);

      if (!Arrays.areEqual(((KeyParameter) params).getKey(), k)) {
        fail("key not odd parity");
      }

      cipher.init(forEncryption, params);
    }