public override void Encode(
BcpgOutputStream bcpgOut)
{
bcpgOut.WriteByte((byte) type);
bcpgOut.WriteByte((byte) algorithm);
if (type != GnuDummyS2K)
{
if (type != 0)
{
bcpgOut.Write(iv);
}
if (type == 3)
{
bcpgOut.WriteByte((byte) itCount);
}
}
else
{
bcpgOut.WriteByte((byte) 'G');
bcpgOut.WriteByte((byte) 'N');
bcpgOut.WriteByte((byte) 'U');
bcpgOut.WriteByte((byte) protectionMode);
}
}
}