Fixed length test for getSecretKey in KeyGenUtils and fixed related unit tests.