question: public static SecretKeys generateKey ( ) throws GeneralSecurityException { fixPrng ( ) ; KeyGenerator keyGen = KeyGenerator . getInstance ( CIPHER ) ; keyGen . init ( AES_KEY_LENGTH_BITS ) ; SecretKey confidentialityKey = keyGen . generateKey ( ) ; byte [ ] integrityKeyBytes = randomBytes ( HMAC_KEY_LENGTH_BITS / 8 ) ; SecretKey integrityKey = new SecretKeySpec ( integrityKeyBytes , HMAC_ALGORITHM ) ; return new SecretKeys ( confidentialityKey , integrityKey ) ; }
target:  A function that generates random AES & HMAC keys and prints out exceptions but doesn't throw them since none should be encountered. If they are encountered, the return value is null.