Package org.bouncycastle.asn1.tsp
Class EvidenceRecord
java.lang.Object
org.bouncycastle.asn1.ASN1Object
org.bouncycastle.asn1.tsp.EvidenceRecord
- All Implemented Interfaces:
org.bouncycastle.asn1.ASN1Encodable
,org.bouncycastle.util.Encodable
public class EvidenceRecord
extends org.bouncycastle.asn1.ASN1Object
RFC 4998:
Evidence Record Syntax (ERS)
EvidenceRecord ::= SEQUENCE { version INTEGER { v1(1) } , digestAlgorithms SEQUENCE OF AlgorithmIdentifier, cryptoInfos [0] CryptoInfos OPTIONAL, encryptionInfo [1] EncryptionInfo OPTIONAL, archiveTimeStampSequence ArchiveTimeStampSequence } CryptoInfos ::= SEQUENCE SIZE (1..MAX) OF Attribute
-
Constructor Summary
ConstructorsConstructorDescriptionEvidenceRecord
(CryptoInfos cryptoInfos, EncryptionInfo encryptionInfo, ArchiveTimeStamp archiveTimeStamp) Build a basic evidence record from an initial ArchiveTimeStamp.EvidenceRecord
(org.bouncycastle.asn1.x509.AlgorithmIdentifier[] digestAlgorithms, CryptoInfos cryptoInfos, EncryptionInfo encryptionInfo, ArchiveTimeStampSequence archiveTimeStampSequence) -
Method Summary
Modifier and TypeMethodDescriptionaddArchiveTimeStamp
(ArchiveTimeStamp ats, boolean newChain) Return a new EvidenceRecord with an added ArchiveTimeStamporg.bouncycastle.asn1.x509.AlgorithmIdentifier[]
static EvidenceRecord
getInstance
(Object obj) Return an EvidenceRecord from the given object.static EvidenceRecord
getInstance
(org.bouncycastle.asn1.ASN1TaggedObject tagged, boolean explicit) org.bouncycastle.asn1.ASN1Primitive
toString()
Methods inherited from class org.bouncycastle.asn1.ASN1Object
encodeTo, encodeTo, equals, getEncoded, getEncoded, hasEncodedTagValue, hashCode
-
Constructor Details
-
EvidenceRecord
public EvidenceRecord(CryptoInfos cryptoInfos, EncryptionInfo encryptionInfo, ArchiveTimeStamp archiveTimeStamp) Build a basic evidence record from an initial ArchiveTimeStamp.- Parameters:
cryptoInfos
-encryptionInfo
-archiveTimeStamp
-
-
EvidenceRecord
public EvidenceRecord(org.bouncycastle.asn1.x509.AlgorithmIdentifier[] digestAlgorithms, CryptoInfos cryptoInfos, EncryptionInfo encryptionInfo, ArchiveTimeStampSequence archiveTimeStampSequence)
-
-
Method Details
-
getInstance
Return an EvidenceRecord from the given object.- Parameters:
obj
- the object we want converted.- Returns:
- an EvidenceRecord instance, or null.
- Throws:
IllegalArgumentException
- if the object cannot be converted.
-
getInstance
public static EvidenceRecord getInstance(org.bouncycastle.asn1.ASN1TaggedObject tagged, boolean explicit) -
getDigestAlgorithms
public org.bouncycastle.asn1.x509.AlgorithmIdentifier[] getDigestAlgorithms() -
getArchiveTimeStampSequence
-
addArchiveTimeStamp
Return a new EvidenceRecord with an added ArchiveTimeStamp- Parameters:
ats
- the archive timestamp to addnewChain
- states whether this new archive timestamp must be added as part of a new sequence (i.e. in the case of hashtree renewal) or not (i.e. in the case of timestamp renewal)- Returns:
- the new EvidenceRecord
-
toString
-
toASN1Primitive
public org.bouncycastle.asn1.ASN1Primitive toASN1Primitive()- Specified by:
toASN1Primitive
in interfaceorg.bouncycastle.asn1.ASN1Encodable
- Specified by:
toASN1Primitive
in classorg.bouncycastle.asn1.ASN1Object
-