{
case PublicKeyAlgorithmTags.RSA_GENERAL:
case PublicKeyAlgorithmTags.RSA_SIGN:
return new RSADigestSigner(createDigest(hashAlgorithm));
case PublicKeyAlgorithmTags.DSA:
return new DSADigestSigner(new DSASigner(), createDigest(hashAlgorithm));
default:
throw new PGPException("cannot recognise keyAlgorithm");
}
}