public PgpEncryptedDataList( BcpgInputStream bcpgInput) { while (bcpgInput.NextPacketTag() == PacketTag.PublicKeyEncryptedSession || bcpgInput.NextPacketTag() == PacketTag.SymmetricKeyEncryptedSessionKey) { list.Add(bcpgInput.ReadPacket()); } data = (InputStreamPacket)bcpgInput.ReadPacket(); for (int i = 0; i != list.Count; i++) { if (list[i] is SymmetricKeyEncSessionPacket) { list[i] = new PgpPbeEncryptedData((SymmetricKeyEncSessionPacket)list[i], data); } else { list[i] = new PgpPublicKeyEncryptedData((PublicKeyEncSessionPacket)list[i], data); } } }
public PgpEncryptedDataList( BcpgInputStream bcpgInput) { while (bcpgInput.NextPacketTag() == PacketTag.PublicKeyEncryptedSession || bcpgInput.NextPacketTag() == PacketTag.SymmetricKeyEncryptedSessionKey) { list.Add(bcpgInput.ReadPacket()); } data = (InputStreamPacket)bcpgInput.ReadPacket(); for (int i = 0; i != list.Count; i++) { if (list[i] is SymmetricKeyEncSessionPacket) { list[i] = new PgpPbeEncryptedData((SymmetricKeyEncSessionPacket) list[i], data); } else { list[i] = new PgpPublicKeyEncryptedData((PublicKeyEncSessionPacket) list[i], data); } } }