add all
This commit is contained in:
42
Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ExperimentalPacket.cs
vendored
Normal file
42
Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ExperimentalPacket.cs
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
|
||||
#pragma warning disable
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace Best.HTTP.SecureProtocol.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);
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore
|
||||
#endif
|
||||
Reference in New Issue
Block a user