spGen.setSignerUserID(false, sigKeyUserid);
int algorithm = sigSecretKey.getPublicKey().getAlgorithm();
PGPSignatureGenerator sigGen = new PGPSignatureGenerator(algorithm, HashAlgorithmTags.SHA1, "BC");
sigGen.initSign(PGPSignature.BINARY_DOCUMENT, sigPrivateKey);
sigGen.setHashedSubpackets(spGen.generate());
sigGen.generateOnePassVersion(false).encode(out);
return sigGen;
}
public Object unmarshal(Exchange exchange, InputStream encryptedStream) throws Exception {