Package org.bouncycastle.asn1.tsp
Class ArchiveTimeStamp
java.lang.Object
org.bouncycastle.asn1.ASN1Object
org.bouncycastle.asn1.tsp.ArchiveTimeStamp
- All Implemented Interfaces:
ASN1Encodable,Encodable
Implementation of the Archive Timestamp type defined in RFC4998.
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
-
Constructor Summary
ConstructorsConstructorDescriptionArchiveTimeStamp(ContentInfo timeStamp) ArchiveTimeStamp(AlgorithmIdentifier digestAlgorithm, Attributes attributes, PartialHashtree[] reducedHashTree, ContentInfo timeStamp) ArchiveTimeStamp(AlgorithmIdentifier digestAlgorithm, PartialHashtree[] reducedHashTree, ContentInfo timeStamp) -
Method Summary
Modifier and TypeMethodDescriptionReturn the contents of the digestAlgorithm field - null if not set.static ArchiveTimeStampgetInstance(Object obj) Return an ArchiveTimestamp from the given object.Method providing a primitive representation of this object suitable for encoding.Methods inherited from class org.bouncycastle.asn1.ASN1Object
encodeTo, encodeTo, equals, getEncoded, getEncoded, hasEncodedTagValue, hashCode
-
Constructor Details
-
ArchiveTimeStamp
public ArchiveTimeStamp(AlgorithmIdentifier digestAlgorithm, PartialHashtree[] reducedHashTree, ContentInfo timeStamp) -
ArchiveTimeStamp
-
ArchiveTimeStamp
public ArchiveTimeStamp(AlgorithmIdentifier digestAlgorithm, Attributes attributes, PartialHashtree[] reducedHashTree, ContentInfo timeStamp)
-
-
Method Details
-
getInstance
Return an ArchiveTimestamp from the given object.- Parameters:
obj- the object we want converted.- Returns:
- an ArchiveTimestamp instance, or null.
- Throws:
IllegalArgumentException- if the object cannot be converted.
-
getDigestAlgorithmIdentifier
-
getDigestAlgorithm
Return the contents of the digestAlgorithm field - null if not set.- Returns:
- the contents of the digestAlgorithm field, or null if not set.
-
getReducedHashTree
-
getTimeStamp
-
toASN1Primitive
Description copied from class:ASN1ObjectMethod providing a primitive representation of this object suitable for encoding.- Specified by:
toASN1Primitivein interfaceASN1Encodable- Specified by:
toASN1Primitivein classASN1Object- Returns:
- a primitive representation of this object.
-