init commit
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace Org.BouncyCastle.Asn1;
|
||||
|
||||
public class Asn1OutputStream : DerOutputStream
|
||||
{
|
||||
public Asn1OutputStream(Stream os)
|
||||
: base(os)
|
||||
{
|
||||
}
|
||||
|
||||
[Obsolete("Use version taking an Asn1Encodable arg instead")]
|
||||
public override void WriteObject(object obj)
|
||||
{
|
||||
if (obj == null)
|
||||
{
|
||||
WriteNull();
|
||||
return;
|
||||
}
|
||||
if (obj is Asn1Object)
|
||||
{
|
||||
((Asn1Object)obj).Encode(this);
|
||||
return;
|
||||
}
|
||||
if (obj is Asn1Encodable)
|
||||
{
|
||||
((Asn1Encodable)obj).ToAsn1Object().Encode(this);
|
||||
return;
|
||||
}
|
||||
throw new IOException("object not Asn1Encodable");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user