summary refs log tree commit diff
path: root/crypto/src/asn1/DerGeneralizedTime.cs
blob: 3d814de30d0db9590165bdba1f92d1bd02bfa020 (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
29
30
31
32
33
34
using System;

namespace Org.BouncyCastle.Asn1
{
    public class DerGeneralizedTime
        : Asn1GeneralizedTime
    {
        public DerGeneralizedTime(string timeString)
            : base(timeString)
        {
        }

        public DerGeneralizedTime(DateTime dateTime)
            : base(dateTime)
        {
        }

        internal DerGeneralizedTime(byte[] contents)
            : base(contents)
        {
        }

        internal override IAsn1Encoding GetEncoding(int encoding)
        {
            return new PrimitiveEncoding(Asn1Tags.Universal, Asn1Tags.GeneralizedTime,
                GetContents(Asn1OutputStream.EncodingDer));
        }

        internal override IAsn1Encoding GetEncodingImplicit(int encoding, int tagClass, int tagNo)
        {
            return new PrimitiveEncoding(tagClass, tagNo, GetContents(Asn1OutputStream.EncodingDer));
        }
    }
}