diff options
author | Oren Novotny <oren@novotny.org> | 2015-10-18 18:14:08 -0400 |
---|---|---|
committer | Oren Novotny <oren@novotny.org> | 2015-10-18 18:15:19 -0400 |
commit | 3db90551169b383bc6b78b81954e20a10cb92f59 (patch) | |
tree | 74a48d7907f41fbb0e5a3a6488c6c4a6dfdd8941 /crypto/src/asn1 | |
parent | remove unneeded local nuget (diff) | |
download | BouncyCastle.NET-ed25519-3db90551169b383bc6b78b81954e20a10cb92f59.tar.xz |
remove files not in master
Diffstat (limited to 'crypto/src/asn1')
-rw-r--r-- | crypto/src/asn1/DerUnknownTag.cs | 80 |
1 files changed, 0 insertions, 80 deletions
diff --git a/crypto/src/asn1/DerUnknownTag.cs b/crypto/src/asn1/DerUnknownTag.cs deleted file mode 100644 index 1e0e61495..000000000 --- a/crypto/src/asn1/DerUnknownTag.cs +++ /dev/null @@ -1,80 +0,0 @@ -using System; - -using Org.BouncyCastle.Utilities; - -namespace Org.BouncyCastle.Asn1 -{ - /** - * We insert one of these when we find a tag we don't recognise. - */ - public class DerUnknownTag - : Asn1Object - { - private readonly bool isConstructed; - private readonly int tag; - private readonly byte[] data; - - /** - * @param tag the tag value. - * @param data the contents octets. - */ - public DerUnknownTag( - int tag, - byte[] data) - : this(false, tag, data) - { - } - - public DerUnknownTag( - bool isConstructed, - int tag, - byte[] data) - { - if (data == null) - throw new ArgumentNullException("data"); - - this.isConstructed = isConstructed; - this.tag = tag; - this.data = data; - } - - public bool IsConstructed - { - get { return isConstructed; } - } - - public int Tag - { - get { return tag; } - } - - public byte[] GetData() - { - return data; - } - - internal override void Encode( - DerOutputStream derOut) - { - derOut.WriteEncoded(isConstructed ? Asn1Tags.Constructed : 0, tag, data); - } - - protected override bool Asn1Equals( - Asn1Object asn1Object) - { - DerUnknownTag other = asn1Object as DerUnknownTag; - - if (other == null) - return false; - - return this.isConstructed == other.isConstructed - && this.tag == other.tag - && Arrays.AreEqual(this.data, other.data); - } - - protected override int Asn1GetHashCode() - { - return isConstructed.GetHashCode() ^ tag.GetHashCode() ^ Arrays.GetHashCode(data); - } - } -} |