lv.eparaksts.pdf

## Interface PdfBasicSignature

- All Superinterfaces:
    PdfSignature

      public interface PdfBasicSignature
      extends PdfSignature

  A `PdfBasicSignature` interface represents access methods to BASIC profile signature functionality.
  See Also:
    `SignatureProfile`, `PdfSignature.getProfile()`

- - ### Field Summary

    - ### Fields inherited from interface lv.eparaksts.pdf.PdfSignature

      `KEY_SIGNATURE_METHOD_OID, SIGNATURE_METHOD_ECDSA_SHA256, SIGNATURE_METHOD_ECDSA_SHA384, SIGNATURE_METHOD_ECDSA_SHA512, SIGNATURE_METHOD_RSA_SHA1, SIGNATURE_METHOD_RSA_SHA224, SIGNATURE_METHOD_RSA_SHA256, SIGNATURE_METHOD_RSA_SHA384, SIGNATURE_METHOD_RSA_SHA512`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `byte[]` | `getSignableBytes()` Returns signable bytes.
    `void` | `setContactInfo(String contactInfo)` Sets contact information of the signer.
    `void` | `setLocation(String location)` Sets location of the signing.
    `void` | `setReason(String reason)` Sets reason of the signing.
    `void` | `setSignatureValue(byte[] signatureValue)` Sets a signature value to the signature.
    `void` | `setSigningCertificate(X509Certificate certificate)` Sets signing certificate for the signature.
    `void` | `setVisualSignature(PdfVisualSignature pdfVisualSignature)` Sets visual appearance of signature.

    - ### Methods inherited from interface lv.eparaksts.pdf.PdfSignature

      `basicSignature, complete, getCerts, getClaimedSigningTime, getCRLs, getDocumentTimestamp, getId, getLocation, getOCSPs, getProfile, getReason, getSignatureMethodAlgorithm, getSignatureTimestamp, getSignatureValue, getSignatureValueDigest, getSigningCertificate, qualifiedSignature`

- - ### Method Detail

    - #### setLocation

          void setLocation(String location)

      Sets location of the signing.
      Parameters:
        `location` - location of the signing.

    - #### setReason

          void setReason(String reason)

      Sets reason of the signing.
      Parameters:
        `reason` - reason of the signing.

    - #### setContactInfo

          void setContactInfo(String contactInfo)

      Sets contact information of the signer.
      Parameters:
        `contactInfo` - contact information.

    - #### setVisualSignature

          void setVisualSignature(PdfVisualSignature pdfVisualSignature)
                           throws PdfException

      Sets visual appearance of signature.
      Parameters:
        `pdfVisualSignature` -
      Throws:
        `PdfException` - if an error occurs.

    - #### setSigningCertificate

          void setSigningCertificate(X509Certificate certificate)
                              throws PdfException

      Sets signing certificate for the signature.
      Parameters:
        `certificate` - signing certificate.
      Throws:
        `PdfException` - if an error occurs.

    - #### getSignableBytes

          byte[] getSignableBytes()
                           throws PdfException

      Returns signable bytes. Signable bytes is hash that is calculated using signature method algorithm. Signing certificate and signable bytes can be used to validate the signature value.
      Returns:
        hashed signable data
      Throws:
        `PdfException` - if an error occurs.
      See Also:
        `PdfSignature.getSignatureMethodAlgorithm()`

    - #### setSignatureValue

          void setSignatureValue(byte[] signatureValue)
                          throws PdfException

      Sets a signature value to the signature. Signature value can be calculated from signable bytes and signing certificate.
      Parameters:
        `signatureValue` - signature value
      Throws:
        `PdfException` - if an error occurs.

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