Interface Signature

    • Method Detail

      • update

        void update​(SessionContext session,
                    byte[] hash,
                    int off,
                    int len)
             throws Exception
        Update the computed signature with the given data
        Parameters:
        session - The SessionContext for calling this method - may be null if not called within a session context
        hash - The hash data buffer
        off - Offset of hash data in buffer
        len - Length of hash data
        Throws:
        Exception - If failed to update
      • verify

        boolean verify​(SessionContext session,
                       byte[] sig)
                throws Exception
        Verify against the given signature
        Parameters:
        session - The SessionContext for calling this method - may be null if not called within a session context
        sig - The signed data
        Returns:
        true if signature is valid
        Throws:
        Exception - If failed to extract signed data for validation
      • sign

        byte[] sign​(SessionContext session)
             throws Exception
        Compute the signature
        Parameters:
        session - The SessionContext for calling this method - may be null if not called within a session context
        Returns:
        The signature value
        Throws:
        Exception - If failed to calculate the signature