Intel

Developer Zone

Signature

com.intel.crypto

Interface Signature

    • Method Summary

      Methods
      Modifier and Type Method and Description
      short getSignatureLength()
      Returns the length of the signature generated by this instance.
      short signComplete(byte[] data, short dataIndex, short dataLength, byte[] signature, short signatureIndex)
      Signs the provided input data using the key currently stored by the instance.
      boolean verifyComplete(byte[] data, short dataIndex, short dataLength, byte[] signature, short signatureIndex, short signatureLength)
      Verifies the signature on the provided input data using the key currently stored by the instance.
    • Method Detail

      • signComplete

        short signComplete(byte[] data,
                         short dataIndex,
                         short dataLength,
                         byte[] signature,
                         short signatureIndex)
                           throws CryptoException
        Signs the provided input data using the key currently stored by the instance.
        Parameters:
        data - the input data to sign
        dataIndex - index in the input array
        dataLength - input data length
        signature - an array to hold the output data
        signatureIndex - index in the output array
        Returns:
        The number of bytes written into the signature array.
        Throws:
        NotInitializedException - if this instance is not configured correctly in order to generate a signature. For example, the key required for signing the data is not set.
        IllegalParameterException - if the data provided for signing is illegal
        CryptoException - if some unexpected error has occurred
      • verifyComplete

        boolean verifyComplete(byte[] data,
                             short dataIndex,
                             short dataLength,
                             byte[] signature,
                             short signatureIndex,
                             short signatureLength)
                               throws CryptoException
        Verifies the signature on the provided input data using the key currently stored by the instance.
        Parameters:
        data - the input data that was signed
        dataIndex - index in the input array
        dataLength - input data length
        signature - the signature to verify
        signatureIndex - index in the signature array
        signatureLength - signature length
        Returns:
        true if the signature verified successfully, false otherwise.
        Throws:
        NotInitializedException - if this instance is not configured correctly in order to verify the signature. For example, the key required for verifying the signature is not set.
        IllegalParameterException - if the data provided for verification is illegal
        CryptoException - if some unexpected error has occurred
      • getSignatureLength

        short getSignatureLength()
                                 throws CryptoException
        Returns the length of the signature generated by this instance.
        Returns:
        Signature length in bytes.
        Throws:
        NotInitializedException - if this instance is not configured correctly in order to calculate the signature size. For example, a required key is not set.
        CryptoException - if some unexpected error has occurred