Record Class IdSigningTime

java.lang.Object
java.lang.Record
br.ufsc.labsec.parser.cades.attributes.signed.IdSigningTime
Record Components:
time - O horário da assinatura
All Implemented Interfaces:
SignatureAttribute<org.bouncycastle.asn1.cms.Attribute>

public record IdSigningTime(org.bouncycastle.asn1.x509.Time time) extends Record implements SignatureAttribute<org.bouncycastle.asn1.cms.Attribute>
O atributo SigningTime representa o instante da assinatura, ou seja, o momento em que o signatário realiza o processo de assinatura.

Este atributo é opcional para todas as políticas do Padrão Brasileiro de Assinatura Digital.

Mais informações: RFC 3852.

Oid e esquema do atributo id-signingTime retirado da RFC 3852:

id-signingTime OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs9(9) 5 }

SigningTime ::= Time

Time ::= CHOICE {
utcTime UTCTime,
generalizedTime GeneralizedTime }
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    static final String
    Mensagem de erro do tempo de assinatura comparado com o período de validade do certificado.
  • Constructor Summary

    Constructors
    Constructor
    Description
    IdSigningTime(org.bouncycastle.asn1.x509.Time time)
    Creates an instance of a IdSigningTime record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    org.bouncycastle.asn1.cms.Attribute
    Retorna o atributo codificado
    Retorna o identificador do atributo
    final int
    Returns a hash code value for this object.
    boolean
    Informa se o atributo é assinado
    boolean
    Verifica se o atributo deve ter apenas uma instância na assinatura
    org.bouncycastle.asn1.x509.Time
    Retorna o tempo contido neste atributo
    final String
    Returns a string representation of this record class.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • IDENTIFIER

      public static final String IDENTIFIER
    • INVALID_SIGNING_TIME

      public static final String INVALID_SIGNING_TIME
      Mensagem de erro do tempo de assinatura comparado com o período de validade do certificado.
      See Also:
  • Constructor Details

    • IdSigningTime

      public IdSigningTime(org.bouncycastle.asn1.x509.Time time)
      Creates an instance of a IdSigningTime record class.
      Parameters:
      time - the value for the time record component
  • Method Details

    • time

      public org.bouncycastle.asn1.x509.Time time()
      Retorna o tempo contido neste atributo
      Returns:
      O horário da assinatura
    • getIdentifier

      public String getIdentifier()
      Retorna o identificador do atributo
      Specified by:
      getIdentifier in interface SignatureAttribute<org.bouncycastle.asn1.cms.Attribute>
      Returns:
      O identificador do atributo
    • getEncoded

      public org.bouncycastle.asn1.cms.Attribute getEncoded() throws SignatureAttributeException
      Retorna o atributo codificado
      Specified by:
      getEncoded in interface SignatureAttribute<org.bouncycastle.asn1.cms.Attribute>
      Returns:
      O atributo em formato ASN1
      Throws:
      SignatureAttributeException
    • isSigned

      public boolean isSigned()
      Informa se o atributo é assinado
      Specified by:
      isSigned in interface SignatureAttribute<org.bouncycastle.asn1.cms.Attribute>
      Returns:
      Indica se o atributo é assinado
    • isUnique

      public boolean isUnique()
      Verifica se o atributo deve ter apenas uma instância na assinatura
      Specified by:
      isUnique in interface SignatureAttribute<org.bouncycastle.asn1.cms.Attribute>
      Returns:
      Indica se o atributo deve ter apenas uma instância na assinatura
    • 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.