Top Description Fields Constructors Methods
org.bouncycastle.asn1

public Class DERGeneralizedTime

extends ASN1GeneralizedTime
Class Inheritance
Imports
java.io.IOException, java.util.Date, org.bouncycastle.util.Strings

DER Generalized time object.

11: Restrictions on BER employed by both CER and DER

11.7 GeneralizedTime

11.7.1 The encoding shall terminate with a "Z", as described in the ITU-T Rec. X.680 | ISO/IEC 8824-1 clause on GeneralizedTime.

11.7.2 The seconds element shall always be present.

11.7.3 The fractional-seconds elements, if present, shall omit all trailing zeros; if the elements correspond to 0, they shall be wholly omitted, and the decimal point element also shall be omitted.

Field Summary

Inherited from org.bouncycastle.asn1.ASN1GeneralizedTime:
contentsTYPE

Constructor Summary

AccessConstructor and Description
public
DERGeneralizedTime(byte[] time)

public
public

Method Summary

Modifier and TypeMethod and Description
pack-priv void
pack-priv int
private byte[]
pack-priv ASN1Primitive
toDERObject()

Overrides org.bouncycastle.asn1.ASN1GeneralizedTime.toDERObject.

Return the current object as one which encodes using Distinguished Encoding Rules.

pack-priv ASN1Primitive
toDLObject()

Overrides org.bouncycastle.asn1.ASN1Primitive.toDLObject.

Return the current object as one which encodes using Definite Length encoding.

Inherited from org.bouncycastle.asn1.ASN1GeneralizedTime:
asn1EqualscreatePrimitiveencodeConstructedgetDategetInstancegetInstancegetTimegetTimeStringhasFractionalSecondshashCodehasMinuteshasSeconds

Constructor Detail

DERGeneralizedTimeback to summary
public DERGeneralizedTime(byte[] time)
DERGeneralizedTimeback to summary
public DERGeneralizedTime(Date time)
DERGeneralizedTimeback to summary
public DERGeneralizedTime(String time)

Method Detail

encodeback to summary
pack-priv void encode(ASN1OutputStream out, boolean withTag) throws IOException

Overrides org.bouncycastle.asn1.ASN1GeneralizedTime.encode.

encodedLengthback to summary
pack-priv int encodedLength(boolean withTag)

Overrides org.bouncycastle.asn1.ASN1GeneralizedTime.encodedLength.

getDERTimeback to summary
private byte[] getDERTime()
toDERObjectback to summary
pack-priv ASN1Primitive toDERObject()

Overrides org.bouncycastle.asn1.ASN1GeneralizedTime.toDERObject.

Doc from org.bouncycastle.asn1.ASN1Primitive.toDERObject.

Return the current object as one which encodes using Distinguished Encoding Rules.

Returns:ASN1Primitive

a DER version of this.

toDLObjectback to summary
pack-priv ASN1Primitive toDLObject()

Overrides org.bouncycastle.asn1.ASN1Primitive.toDLObject.

Doc from org.bouncycastle.asn1.ASN1Primitive.toDLObject.

Return the current object as one which encodes using Definite Length encoding.

Returns:ASN1Primitive

a DL version of this.