diff options
Diffstat (limited to 'crypto/src/asn1/DerGeneralizedTime.cs')
-rw-r--r-- | crypto/src/asn1/DerGeneralizedTime.cs | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/crypto/src/asn1/DerGeneralizedTime.cs b/crypto/src/asn1/DerGeneralizedTime.cs index 0386ecb02..3d814de30 100644 --- a/crypto/src/asn1/DerGeneralizedTime.cs +++ b/crypto/src/asn1/DerGeneralizedTime.cs @@ -5,29 +5,30 @@ namespace Org.BouncyCastle.Asn1 public class DerGeneralizedTime : Asn1GeneralizedTime { - public DerGeneralizedTime(byte[] time) - : base(time) + public DerGeneralizedTime(string timeString) + : base(timeString) { } - public DerGeneralizedTime(DateTime time) - : base(time) + public DerGeneralizedTime(DateTime dateTime) + : base(dateTime) { } - public DerGeneralizedTime(string time) - : base(time) + internal DerGeneralizedTime(byte[] contents) + : base(contents) { } internal override IAsn1Encoding GetEncoding(int encoding) { - return new PrimitiveEncoding(Asn1Tags.Universal, Asn1Tags.GeneralizedTime, GetDerTime()); + 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, GetDerTime()); + return new PrimitiveEncoding(tagClass, tagNo, GetContents(Asn1OutputStream.EncodingDer)); } } } |