Class LocalTimestampProvider
java.lang.Object
br.ufsc.labsec.signature.tsa.providers.TimestampProvider
br.ufsc.labsec.signature.tsa.providers.LocalTimestampProvider
- All Implemented Interfaces:
TimeStamp
public class LocalTimestampProvider extends TimestampProvider implements TimeStamp
Esta classe é responsável por se conectar localmente ao TSA e retornar um carimbo de tempo.
É utilizada em testes do Assinador.
-
Field Summary
Fields inherited from class br.ufsc.labsec.signature.tsa.providers.TimestampProvider
component
-
Constructor Summary
Constructors Constructor Description LocalTimestampProvider(TimeStampComponent component)
-
Method Summary
Modifier and Type Method Description <Encod, Sig extends Signature<Encod>>
TSInformation<Encod,Sig>constructCadesInformation(Sig signature)
KeyStoreInformation
constructKeyStoreInformation()
temporary fix: `privateInformation` is not created inside the constructor because we don't want a GET request to `KEYSTORE_URL` every time the component is created via `TimeStampComponent#getTimeStamp()`<Encod, Sig extends Signature<Encod>>
byte[]getTimeStamp(FileToBeSigned<? extends TSInformation<Encod,Sig>> fileToBeSigned)
Retorna um carimbo de tempo pro conteúdo dadoMethods inherited from class br.ufsc.labsec.signature.tsa.providers.TimestampProvider
request
-
Constructor Details
-
LocalTimestampProvider
-
-
Method Details
-
getTimeStamp
public <Encod, Sig extends Signature<Encod>> byte[] getTimeStamp(FileToBeSigned<? extends TSInformation<Encod,Sig>> fileToBeSigned)Retorna um carimbo de tempo pro conteúdo dado- Specified by:
getTimeStamp
in interfaceTimeStamp
- Parameters:
fileToBeSigned
- Conteúdo para assinar do carimbo de tempo- Returns:
- O carimbo de tempo pro conteúdo dado
-
constructKeyStoreInformation
temporary fix: `privateInformation` is not created inside the constructor because we don't want a GET request to `KEYSTORE_URL` every time the component is created via `TimeStampComponent#getTimeStamp()`- Specified by:
constructKeyStoreInformation
in interfaceTimeStamp
- Throws:
TimeStampException
-
constructCadesInformation
public <Encod, Sig extends Signature<Encod>> TSInformation<Encod,Sig> constructCadesInformation(Sig signature)- Specified by:
constructCadesInformation
in interfaceTimeStamp
-