LiteralDataPacket
using Org.BouncyCastle.Utilities;
namespace Org.BouncyCastle.Bcpg
{
public class LiteralDataPacket : InputStreamPacket
{
private readonly int m_format;
private readonly byte[] m_fileName;
private readonly long m_modDate;
public int Format => m_format;
public long ModificationTime => m_modDate;
public string FileName => Strings.FromUtf8ByteArray(m_fileName);
internal LiteralDataPacket(BcpgInputStream bcpgIn)
: base(bcpgIn)
{
m_format = bcpgIn.RequireByte();
int num = bcpgIn.RequireByte();
m_fileName = new byte[num];
bcpgIn.ReadFully(m_fileName);
m_modDate = (long)StreamUtilities.RequireUInt32BE(bcpgIn) * 1000;
}
public byte[] GetRawFileName()
{
return Arrays.Clone(m_fileName);
}
}
}