Package net.jsign

Interface Signable

    • Method Detail

      • computeDigest

        byte[] computeDigest​(MessageDigest digest)
                      throws IOException
        Computes the digest of the file.
        Parameters:
        digest - the message digest to update
        Returns:
        the digest of the file
        Throws:
        IOException - if an I/O error occurs
      • createIndirectData

        ASN1Object createIndirectData​(DigestAlgorithm digestAlgorithm)
                               throws IOException
        Creates the SpcIndirectDataContent structure containing the digest of the file.
        Parameters:
        digestAlgorithm - the digest algorithm to use
        Returns:
        the SpcIndirectDataContent structure in ASN.1 format
        Throws:
        IOException - if an I/O error occurs
      • of

        static Signable of​(File file)
                    throws IOException
        Returns a signable object for the file specified.
        Parameters:
        file - the file that is intended to to be signed
        Returns:
        the signable object for the specified file
        Throws:
        IOException - if an I/O error occurs
        UnsupportedOperationException - if the file specified isn't supported
      • of

        static Signable of​(File file,
                           Charset encoding)
                    throws IOException
        Returns a signable object for the file specified.
        Parameters:
        file - the file that is intended to to be signed
        encoding - the character encoding (for text files only). If the file has a byte order mark this parameter is ignored.
        Returns:
        the signable object for the specified file
        Throws:
        IOException - if an I/O error occurs
        UnsupportedOperationException - if the file specified isn't supported