Package org.bouncycastle.asn1.tsp
Class ArchiveTimeStamp
java.lang.Object
org.bouncycastle.asn1.ASN1Object
org.bouncycastle.asn1.tsp.ArchiveTimeStamp
- All Implemented Interfaces:
org.bouncycastle.asn1.ASN1Encodable,org.bouncycastle.util.Encodable
public class ArchiveTimeStamp
extends org.bouncycastle.asn1.ASN1Object
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
- RFC 4998
-
Constructor Summary
ConstructorsConstructorDescriptionArchiveTimeStamp(ContentInfo timeStamp) ArchiveTimeStamp(org.bouncycastle.asn1.x509.AlgorithmIdentifier digestAlgorithm, Attributes attributes, PartialHashtree[] reducedHashTree, ContentInfo timeStamp) ArchiveTimeStamp(org.bouncycastle.asn1.x509.AlgorithmIdentifier digestAlgorithm, PartialHashtree[] reducedHashTree, ContentInfo timeStamp) -
Method Summary
Modifier and TypeMethodDescriptionorg.bouncycastle.asn1.x509.AlgorithmIdentifierReturn the contents of the digestAlgorithm field - null if not set.org.bouncycastle.asn1.x509.AlgorithmIdentifierReturn the first node in the reduced hash tree which contains the leaf node.static ArchiveTimeStampgetInstance(Object obj) Return an ArchiveTimestamp from the given object.byte[]org.bouncycastle.asn1.ASN1PrimitiveMethods inherited from class org.bouncycastle.asn1.ASN1Object
encodeTo, encodeTo, equals, getEncoded, getEncoded, hasEncodedTagValue, hashCode
-
Constructor Details
-
ArchiveTimeStamp
public ArchiveTimeStamp(org.bouncycastle.asn1.x509.AlgorithmIdentifier digestAlgorithm, PartialHashtree[] reducedHashTree, ContentInfo timeStamp) -
ArchiveTimeStamp
-
ArchiveTimeStamp
public ArchiveTimeStamp(org.bouncycastle.asn1.x509.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
public org.bouncycastle.asn1.x509.AlgorithmIdentifier getDigestAlgorithmIdentifier() -
getTimeStampDigestValue
public byte[] getTimeStampDigestValue() -
getDigestAlgorithm
public org.bouncycastle.asn1.x509.AlgorithmIdentifier getDigestAlgorithm()Return the contents of the digestAlgorithm field - null if not set.- Returns:
- the contents of the digestAlgorithm field, or null if not set.
-
getHashTreeLeaf
Return the first node in the reduced hash tree which contains the leaf node.- Returns:
- the node containing the data hashes, null if no reduced hash tree is present.
-
getReducedHashTree
-
getTimeStamp
-
toASN1Primitive
public org.bouncycastle.asn1.ASN1Primitive toASN1Primitive()- Specified by:
toASN1Primitivein interfaceorg.bouncycastle.asn1.ASN1Encodable- Specified by:
toASN1Primitivein classorg.bouncycastle.asn1.ASN1Object
-