You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
797 B
39 lines
797 B
2 months ago
|
using System;
|
||
|
using System.IO;
|
||
|
|
||
|
namespace Org.BouncyCastle.Bcpg
|
||
|
{
|
||
|
/// <remarks>Basic packet for an experimental packet.</remarks>
|
||
|
public class ExperimentalPacket
|
||
|
: ContainedPacket //, PublicKeyAlgorithmTag
|
||
|
{
|
||
|
private readonly PacketTag tag;
|
||
|
private readonly byte[] contents;
|
||
|
|
||
|
internal ExperimentalPacket(
|
||
|
PacketTag tag,
|
||
|
BcpgInputStream bcpgIn)
|
||
|
{
|
||
|
this.tag = tag;
|
||
|
|
||
|
this.contents = bcpgIn.ReadAll();
|
||
|
}
|
||
|
|
||
|
public PacketTag Tag
|
||
|
{
|
||
|
get { return tag; }
|
||
|
}
|
||
|
|
||
|
public byte[] GetContents()
|
||
|
{
|
||
|
return (byte[]) contents.Clone();
|
||
|
}
|
||
|
|
||
|
public override void Encode(
|
||
|
BcpgOutputStream bcpgOut)
|
||
|
{
|
||
|
bcpgOut.WritePacket(tag, contents, true);
|
||
|
}
|
||
|
}
|
||
|
}
|