316317318319320321322323324325326
for (i = 0; i < DES.WEAK_KEYS.length; i++) { msg = "detecting weak key 0x" + Util.dumpString(DES.WEAK_KEYS[i]); try { des.makeKey(DES.WEAK_KEYS[i], DES.KEY_SIZE); harness.fail(msg); } catch (WeakKeyException x) { harness.check(true, msg);
336337338339340341342343344345346
{ msg = "detecting semi-weak key 0x" + Util.dumpString(DES.SEMIWEAK_KEYS[i]); try { des.makeKey(DES.SEMIWEAK_KEYS[i], DES.KEY_SIZE); harness.fail(msg); } catch (WeakKeyException x) { harness.check(true, msg);
356357358359360361362363364365366
{ msg = "detecting possible weak key 0x" + Util.dumpString(DES.POSSIBLE_WEAK_KEYS[i]); try { des.makeKey(DES.POSSIBLE_WEAK_KEYS[i], DES.KEY_SIZE); harness.fail(msg); } catch (WeakKeyException x) { harness.check(true, msg);