Record Class TimestampProvider
java.lang.Object
java.lang.Record
br.ufsc.labsec.signature.tsa.providers.TimestampProvider
- All Implemented Interfaces:
TimeStamp
-
Constructor Summary
ConstructorsConstructorDescriptionTimestampProvider(TimeStampComponent component) Creates an instance of aTimestampProviderrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecomponentrecord component.<Encod, Sig extends Signature<Encod>>
TSInformation<Encod, Sig> constructCadesInformation(Sig signature) final booleanIndicates whether some other object is "equal to" this one.<Encod, Sig extends Signature<Encod>>
byte[]getTimeStamp(FileToBeSigned<? extends TSInformation<Encod, Sig>> fileToBeSigned, SignaturePolicyInterface signaturePolicyInterface, CadesSignatureComponent cadesSigComponent, boolean hasUnsignedAttributes, boolean hasCertificateValues, boolean hasRevocationValues) Retorna um carimbo de tempo pro conteúdo dadofinal inthashCode()Returns a hash code value for this object.static org.bouncycastle.tsp.TimeStampRequestrequest(FileToBeSigned<? extends CadesInformation> fileToBeSigned) Gera uma requisição de carimbo de tempo pro conteúdo dadofinal StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TimestampProvider
Creates an instance of aTimestampProviderrecord class.- Parameters:
component- the value for thecomponentrecord component
-
-
Method Details
-
request
public static org.bouncycastle.tsp.TimeStampRequest request(FileToBeSigned<? extends CadesInformation> fileToBeSigned) throws TimeStampException Gera uma requisição de carimbo de tempo pro conteúdo dado- Parameters:
fileToBeSigned- conteúdo para carimbar- Returns:
- A requisição de carimbo de tempo pro conteúdo dado
- Throws:
TimeStampException
-
getTimeStamp
public <Encod, Sig extends Signature<Encod>> byte[] getTimeStamp(FileToBeSigned<? extends TSInformation<Encod, Sig>> fileToBeSigned, SignaturePolicyInterface signaturePolicyInterface, CadesSignatureComponent cadesSigComponent, boolean hasUnsignedAttributes, boolean hasCertificateValues, boolean hasRevocationValues) Description copied from interface:TimeStampRetorna um carimbo de tempo pro conteúdo dado- Specified by:
getTimeStampin interfaceTimeStamp- Parameters:
fileToBeSigned- arquivo a ser assinadosignaturePolicyInterface- A política de assinaturacadesSigComponent- O componente de assinatura CAdEShasUnsignedAttributes- Indica se a assinatura possui atributos não assinadoshasCertificateValues- Indica se a assinatura possui o atributo CertificateValueshasRevocationValues- Indica se a assinatura possui o atributo RevocationValues- Returns:
- O carimbo de tempo pro conteúdo dado
-
constructKeyStoreInformation
- Specified by:
constructKeyStoreInformationin interfaceTimeStamp- Throws:
TimeStampException
-
constructCadesInformation
public <Encod, Sig extends Signature<Encod>> TSInformation<Encod,Sig> constructCadesInformation(Sig signature) - Specified by:
constructCadesInformationin interfaceTimeStamp
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
component
Returns the value of thecomponentrecord component.- Returns:
- the value of the
componentrecord component
-