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.
44 lines
916 B
44 lines
916 B
2 months ago
|
using System;
|
||
|
|
||
|
namespace Org.BouncyCastle.Asn1
|
||
|
{
|
||
|
/**
|
||
|
* A Null object.
|
||
|
*/
|
||
|
public class DerNull
|
||
|
: Asn1Null
|
||
|
{
|
||
|
public static readonly DerNull Instance = new DerNull();
|
||
|
|
||
|
private static readonly byte[] ZeroBytes = new byte[0];
|
||
|
|
||
|
protected internal DerNull()
|
||
|
{
|
||
|
}
|
||
|
|
||
|
[Obsolete]
|
||
|
#pragma warning disable CS0809 // ��ʱ��Ա��дδ��ʱ��Ա
|
||
|
internal override int EncodedLength(bool withID)
|
||
|
#pragma warning restore CS0809 // ��ʱ��Ա��дδ��ʱ��Ա
|
||
|
{
|
||
|
return Asn1OutputStream.GetLengthOfEncodingDL(withID, 0);
|
||
|
}
|
||
|
|
||
|
[Obsolete]
|
||
|
internal override void Encode(Asn1OutputStream asn1Out, bool withID)
|
||
|
{
|
||
|
asn1Out.WriteEncodingDL(withID, Asn1Tags.Null, ZeroBytes);
|
||
|
}
|
||
|
|
||
|
protected override bool Asn1Equals(Asn1Object asn1Object)
|
||
|
{
|
||
|
return asn1Object is DerNull;
|
||
|
}
|
||
|
|
||
|
protected override int Asn1GetHashCode()
|
||
|
{
|
||
|
return -1;
|
||
|
}
|
||
|
}
|
||
|
}
|