Top Description Fields Constructors Methods
org.bouncycastle.asn1.tsp

public Class ArchiveTimeStamp

extends ASN1Object
Class Inheritance
Imports
org.bouncycastle.asn1.ASN1EncodableVector, .ASN1Object, .ASN1OctetString, .ASN1Primitive, .ASN1Sequence, .ASN1TaggedObject, .DERSequence, .DERTaggedObject, org.bouncycastle.asn1.cms.Attributes, .CMSObjectIdentifiers, .ContentInfo, .SignedData, org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers, org.bouncycastle.asn1.x509.AlgorithmIdentifier

Implementation of the Archive Timestamp type defined in RFC4998.
See Also
RFC 4998

ASN.1 Archive Timestamp

ArchiveTimeStamp ::= SEQUENCE { digestAlgorithm [Ø] AlgorithmIdentifier OPTIONAL, attributes [1] Attributes OPTIONAL, reducedHashtree [2] SEQUENCE OF PartialHashtree OPTIONAL, timeStamp ContentInfo}

PartialHashtree ::= SEQUENCE OF OCTET STRING

Attributes ::= SET SIZE (1..MAX) OF Attribute

Field Summary

Modifier and TypeField and Description
private final Attributes
private final AlgorithmIdentifier
private final ASN1Sequence
private final ContentInfo

Constructor Summary

AccessConstructor and Description
public
ArchiveTimeStamp(AlgorithmIdentifier digestAlgorithm, PartialHashtree[] reducedHashTree, ContentInfo timeStamp)

public
public
ArchiveTimeStamp(AlgorithmIdentifier digestAlgorithm, Attributes attributes, PartialHashtree[] reducedHashTree, ContentInfo timeStamp)

private

Method Summary

Modifier and TypeMethod and Description
public AlgorithmIdentifier

Returns:

the contents of the digestAlgorithm field, or null if not set.
getDigestAlgorithm
()

Return the contents of the digestAlgorithm field - null if not set.

public AlgorithmIdentifier
public PartialHashtree

Returns:

the node containing the data hashes, null if no reduced hash tree is present.
getHashTreeLeaf
()

Return the first node in the reduced hash tree which contains the leaf node.

public static ArchiveTimeStamp

Returns:

an ArchiveTimestamp instance, or null.
getInstance
(final Object
the object we want converted.
obj
)

Return an ArchiveTimestamp from the given object.

public PartialHashtree[]
public ContentInfo
public byte[]
private TSTInfo
public ASN1Primitive
toASN1Primitive()

Implements abstract org.bouncycastle.asn1.ASN1Object.toASN1Primitive.

Implements org.bouncycastle.asn1.ASN1Encodable.toASN1Primitive.

Method providing a primitive representation of this object suitable for encoding.
Inherited from org.bouncycastle.asn1.ASN1Object:
encodeToencodeToequalsgetEncodedgetEncodedhasEncodedTagValuehashCode

Field Detail

attributesback to summary
private final Attributes attributes
digestAlgorithmback to summary
private final AlgorithmIdentifier digestAlgorithm
reducedHashTreeback to summary
private final ASN1Sequence reducedHashTree
timeStampback to summary
private final ContentInfo timeStamp

Constructor Detail

ArchiveTimeStampback to summary
public ArchiveTimeStamp(AlgorithmIdentifier digestAlgorithm, PartialHashtree[] reducedHashTree, ContentInfo timeStamp)
ArchiveTimeStampback to summary
public ArchiveTimeStamp(ContentInfo timeStamp)
ArchiveTimeStampback to summary
public ArchiveTimeStamp(AlgorithmIdentifier digestAlgorithm, Attributes attributes, PartialHashtree[] reducedHashTree, ContentInfo timeStamp)
ArchiveTimeStampback to summary
private ArchiveTimeStamp(final ASN1Sequence sequence)

Method Detail

getDigestAlgorithmback to summary
public AlgorithmIdentifier getDigestAlgorithm()

Return the contents of the digestAlgorithm field - null if not set.

Returns:AlgorithmIdentifier

the contents of the digestAlgorithm field, or null if not set.

getDigestAlgorithmIdentifierback to summary
public AlgorithmIdentifier getDigestAlgorithmIdentifier()
getHashTreeLeafback to summary
public PartialHashtree getHashTreeLeaf()

Return the first node in the reduced hash tree which contains the leaf node.

Returns:PartialHashtree

the node containing the data hashes, null if no reduced hash tree is present.

getInstanceback to summary
public static ArchiveTimeStamp getInstance(final Object obj)

Return an ArchiveTimestamp from the given object.

Parameters
obj:Object

the object we want converted.

Returns:ArchiveTimeStamp

an ArchiveTimestamp instance, or null.

Exceptions
IllegalArgumentException:
if the object cannot be converted.
getReducedHashTreeback to summary
public PartialHashtree[] getReducedHashTree()
getTimeStampback to summary
public ContentInfo getTimeStamp()
getTimeStampDigestValueback to summary
public byte[] getTimeStampDigestValue()
getTimeStampInfoback to summary
private TSTInfo getTimeStampInfo()
toASN1Primitiveback to summary
public ASN1Primitive toASN1Primitive()

Implements abstract org.bouncycastle.asn1.ASN1Object.toASN1Primitive.

Implements org.bouncycastle.asn1.ASN1Encodable.toASN1Primitive.

Doc from org.bouncycastle.asn1.ASN1Object.toASN1Primitive.

Method providing a primitive representation of this object suitable for encoding.

Returns:ASN1Primitive

a primitive representation of this object.