io.gatling.recorder.internal.bouncycastle.tsp.ers.ERSEvidenceRecordGenerator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gatling-recorder-bc-shaded Show documentation
Show all versions of gatling-recorder-bc-shaded Show documentation
Shaded BouncyCastle for Gatling Recorder
package io.gatling.recorder.internal.bouncycastle.tsp.ers;
import java.util.ArrayList;
import java.util.List;
import io.gatling.recorder.internal.bouncycastle.asn1.tsp.EvidenceRecord;
import io.gatling.recorder.internal.bouncycastle.operator.DigestCalculatorProvider;
import io.gatling.recorder.internal.bouncycastle.tsp.TSPException;
public class ERSEvidenceRecordGenerator
{
private final DigestCalculatorProvider digCalcProv;
public ERSEvidenceRecordGenerator(DigestCalculatorProvider digCalcProv)
{
this.digCalcProv = digCalcProv;
}
public ERSEvidenceRecord generate(ERSArchiveTimeStamp archiveTimeStamp)
throws TSPException, ERSException
{
return new ERSEvidenceRecord(
new EvidenceRecord(null, null, archiveTimeStamp.toASN1Structure()), digCalcProv);
}
public List generate(List archiveTimeStamps)
throws TSPException, ERSException
{
List list = new ArrayList(archiveTimeStamps.size());
for (int i = 0; i != archiveTimeStamps.size(); i++)
{
list.add(new ERSEvidenceRecord(
new EvidenceRecord(null, null, ((ERSArchiveTimeStamp)archiveTimeStamps.get(i)).toASN1Structure()), digCalcProv));
}
return list;
}
}