System.out.println("Generated " + rsaKeys.getPrivate().getAlgorithm() + " keys with length" + ((RSAPrivateKey)rsaKeys.getPrivate()).getPrivateExponent().bitLength());
cat.debug("Generated " + rsaKeys.getPrivate().getAlgorithm() + " keys with length" + ((RSAPrivateKey)rsaKeys.getPrivate()).getPrivateExponent().bitLength());
    private static KeyPair genKeys()    throws Exception    {        KeyPairGenerator keygen = KeyPairGenerator.getInstance("RSA");        keygen.initialize(512);        System.out.println("Generating keys, please wait...");        KeyPair rsaKeys = keygen.generateKeyPair();        System.out.println("Generated " + rsaKeys.getPrivate().getAlgorithm() + " keys with length" + ((RSAPrivateKey)rsaKeys.getPrivate()).getPrivateExponent().bitLength());        return rsaKeys;    } // getKeys