a little bit of restructuring to make the generateKey method more directly testable, removal of code which ensured the 8th byte of each key was 0 (it makes no difference if it has random data which is disposed of) and write tests to check correct keylengths produced for nDES