Record Class TimestampProvider

java.lang.Object
java.lang.Record
br.ufsc.labsec.signature.tsa.providers.TimestampProvider
All Implemented Interfaces:
TimeStamp

public record TimestampProvider(TimeStampComponent component) extends Record implements TimeStamp
  • Constructor Details

    • TimestampProvider

      public TimestampProvider(TimeStampComponent component)
      Creates an instance of a TimestampProvider record class.
      Parameters:
      component - the value for the component record 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: TimeStamp
      Retorna um carimbo de tempo pro conteúdo dado
      Specified by:
      getTimeStamp in interface TimeStamp
      Parameters:
      fileToBeSigned - arquivo a ser assinado
      signaturePolicyInterface - A política de assinatura
      cadesSigComponent - O componente de assinatura CAdES
      hasUnsignedAttributes - Indica se a assinatura possui atributos não assinados
      hasCertificateValues - Indica se a assinatura possui o atributo CertificateValues
      hasRevocationValues - Indica se a assinatura possui o atributo RevocationValues
      Returns:
      O carimbo de tempo pro conteúdo dado
    • constructKeyStoreInformation

      public KeyStoreInformation constructKeyStoreInformation() throws TimeStampException
      Specified by:
      constructKeyStoreInformation in interface TimeStamp
      Throws:
      TimeStampException
    • constructCadesInformation

      public <Encod, Sig extends Signature<Encod>> TSInformation<Encod,Sig> constructCadesInformation(Sig signature)
      Specified by:
      constructCadesInformation in interface TimeStamp
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • component

      public TimeStampComponent component()
      Returns the value of the component record component.
      Returns:
      the value of the component record component