From c5065a21286ce0755cee38118b1e288898456f7e Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Tue, 12 Oct 2021 17:27:28 +0700 Subject: Marker packet skipping --- crypto/src/bcpg/BcpgInputStream.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'crypto/src/bcpg') diff --git a/crypto/src/bcpg/BcpgInputStream.cs b/crypto/src/bcpg/BcpgInputStream.cs index f9627fde0..3dba953ea 100644 --- a/crypto/src/bcpg/BcpgInputStream.cs +++ b/crypto/src/bcpg/BcpgInputStream.cs @@ -247,6 +247,17 @@ namespace Org.BouncyCastle.Bcpg } } + public PacketTag SkipMarkerPackets() + { + PacketTag tag; + while ((tag = NextPacketTag()) == PacketTag.Marker) + { + ReadPacket(); + } + + return tag; + } + #if PORTABLE protected override void Dispose(bool disposing) { @@ -257,7 +268,7 @@ namespace Org.BouncyCastle.Bcpg base.Dispose(disposing); } #else - public override void Close() + public override void Close() { Platform.Dispose(m_in); base.Close(); -- cgit 1.4.1