lv.pasts.eme.edoc

## Interface EDOCSignature

- All Known Subinterfaces:
    EDOCPreparedSignature

      public interface EDOCSignature

  An `EDOCSignature` class represents the EDOC signature object.
  See Also:
    `EDOC.addSignature(EDOCSignatureContext)`, `EDOC.getSignature(String)`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `X509Certificate` | `getCertificate()` Returns the certificate used to create this signature.
    `String` | `getID()` Returns the ID of this signature.
    `TimeStamp` | `getSignatureTimeStamp()` Returns timestamp, or `null` if signature has no timestamp.
    `SignatureType` | `getSignatureType()` Returns the signature type used to create this signature.
    `byte[]` | `getSignatureValue()` Returns the signature value of this signature.
    `byte[]` | `getSignatureValueImprintDigest()` Returns a SHA-1 message digest representing the signature value imprint.
    `byte[]` | `getSignedDigest()` Returns the signed digest value.
    `Date` | `getSigningTime()` Returns the date when this signature was created.
    `boolean` | `isDigitalSeal()` Returns true if this signature represents a digital seal.
    `EDOCValidatorResult` | `validate(EDOCValidatorListener listener)` Validates this signature.

- - ### Method Detail

    - #### getID

          String getID()

      Returns the ID of this signature.
      Returns:
        the ID of this signature (never null).

    - #### validate

          EDOCValidatorResult validate(EDOCValidatorListener listener)
                                throws EDOCException

      Validates this signature.

      To notify the user about the validation process, validation status events are generated. To get these notifications, an application must specify an instance of `EDOCValidatorListener` object which implements the required listener methods.

      Parameters:
        `listener` - the EDOCValidatorListener to be notified.
      Returns:
        the result of the validation process.
      Throws:
        `EDOCException` - if EDOC validation cannot be performed.

    - #### getCertificate

          X509Certificate getCertificate()
                                  throws EDOCException

      Returns the certificate used to create this signature.
      Returns:
        the certificate used to create this signature (never null).
      Throws:
        `EDOCException` - if certificate cannot be retrieved.

    - #### getSignatureTimeStamp

          TimeStamp getSignatureTimeStamp()

      Returns timestamp, or `null` if signature has no timestamp.
      Returns:
        timestamp, or `null` if signature has no timestamp.
      Since:
        1.3.2

    - #### getSigningTime

          Date getSigningTime()

      Returns the date when this signature was created.
      Returns:
        the date when this signature was created.

    - #### getSignatureType

          SignatureType getSignatureType()

      Returns the signature type used to create this signature. Signature type also represents the available signature properties.
      Returns:
        the signature type.
      See Also:
        `SignatureType.getProperties()`

    - #### getSignatureValue

          byte[] getSignatureValue()

      Returns the signature value of this signature.
      Returns:
        the signature value.

    - #### getSignatureValueImprintDigest

          byte[] getSignatureValueImprintDigest()

      Returns a SHA-1 message digest representing the signature value imprint.

      Signature value imprint digest is used to create a signature timestamp.
      The input for the timestamp hash computation is the ds:SignatureValue XML element, as defined in ETSI TS 101 903 v1.3.2.

      Returns:
        an array of bytes containing a SHA-1 message digest.
      Since:
        1.3.2
      See Also:
        `getSignatureTimeStamp()`, `TimeStamp.getMessageImprintDigest()`

    - #### isDigitalSeal

          boolean isDigitalSeal()

      Returns true if this signature represents a digital seal.

      A digital seal is determined from the signing certificate.

      Returns:
        true if this signature represents a digital seal.
      Since:
        2.2.1

    - #### getSignedDigest

          byte[] getSignedDigest()
                          throws EDOCException

      Returns the signed digest value.

      NOTE: The digest value is DER encoded `DigestInfo` value, as defined by PKCS#7 Digest-encryption process (RFC 2315).

      Returns:
        the signed digest value.
      Throws:
        `EDOCException` - if the signed digest value cannot be resolved.
      Since:
        2.2.5

Copyright VAS Latvijas Valsts radio un televizijas centrs / Developed by SIA EUSO