init(generator, privateKey);
return generator;
}
private PGPPrivateKey extractPGPPrivateKey(final char[] keyPassPhrase) throws PGPException {
PGPDigestCalculatorProvider calcProvider = new JcaPGPDigestCalculatorProviderBuilder().
setProvider(BouncyCastleProvider.PROVIDER_NAME).
build();
PBESecretKeyDecryptor decryptor = new JcePBESecretKeyDecryptorBuilder(calcProvider).
setProvider(BouncyCastleProvider.PROVIDER_NAME).
build(keyPassPhrase);