if (algo.equalsIgnoreCase("DSA")) {
kspec = new DSAPrivateKeySpec
(new BigInteger(DSA_X), new BigInteger(DSA_P),
new BigInteger(DSA_Q), new BigInteger(DSA_G));
} else if (algo.equalsIgnoreCase("RSA")) {
kspec = new RSAPrivateKeySpec
(new BigInteger(RSA_MOD), new BigInteger(RSA_PRIV));
} else throw new RuntimeException("Unsupported key algorithm " + algo);
return kf.generatePrivate(kspec);
}