blob: bdeb464838af7f008bb10c91ab0e68a1f73d42e4 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
using System;
namespace Org.BouncyCastle.Asn1
{
public abstract class Asn1Utilities
{
public static string GetTagText(Asn1TaggedObject taggedObject)
{
// TODO[asn1] Implement and use taggedObject.TagClass
return GetTagText(Asn1Tags.ContextSpecific, taggedObject.TagNo);
}
public static string GetTagText(int tagClass, int tagNo)
{
switch (tagClass)
{
case Asn1Tags.Application:
return "[APPLICATION " + tagNo + "]";
case Asn1Tags.ContextSpecific:
return "[CONTEXT " + tagNo + "]";
case Asn1Tags.Private:
return "[PRIVATE " + tagNo + "]";
default:
return "[UNIVERSAL " + tagNo + "]";
}
}
}
}
|