{
key = PGPUtil.makeRandomKey(defAlgorithm, rand);
byte[] sessionInfo = createSessionInfo(defAlgorithm, key);
PGPKeyEncryptionMethodGenerator m = (PGPKeyEncryptionMethodGenerator)methods.get(0);
pOut.writePacket(m.generate(defAlgorithm, sessionInfo));
}
}
else // multiple methods
{
key = PGPUtil.makeRandomKey(defAlgorithm, rand);