private static KeyPair newKeyPair ( ) throws Exception { KeyPairGenerator kpGen = KeyPairGenerator . getInstance ( KEY_ALGORITHM , BC ) ; kpGen . initialize ( KEY_LENGTH , new SecureRandom ( ) ) ; return kpGen . generateKeyPair ( ) ; }
Generate a new keypair .