www.beck-ipc.com

@CHIP-RTOS C Library - TCP/IP API


Crypt_SHA1_Update

Update SHA1 hash checksum generator.

int Crypt_SHA1_Update ( Crypt_SHA1_ContextPtr sha1context,                         const void far * inBuffer,                         unsigned int length );

Parameters

sha1context

Pointer to SHA1 context structure

inBuffer

Pointer to user data

length

Length of inBuffer in bytes

Return Value

0: Success
-1: failed

Comments

This function runs the provided data at inBuffer into the hash value accumulator.   The total data set can be passed into the hash value over a series of calls to this function.

A call to Crypt_SHA1_Init() must precede your first call to this function.   After you have passed all of your data into this hash computer with a series of Crypt_SHA1_Update() calls (one or more calls), the Crypt_SHA1_Final() must be called at the end to pick up the answer.

See Also

RTOS API

This library function invokes a RTOS software interrupt. Refer to this RTOS API function's documentation for more details.

On SC1x3/SC2x (RTOS version >= 1.35, CLIB version >= 2.19) there is also a version of this function available which uses dynamic linking instead of the software interrupt.   This reduces the function's overhead and thus speeds up your application.   This function's name is Crypt_SHA1_Update_Dyn, however you should not use this function directly.   Instead you should add the define TCPIP_DYN_LINK to your program before including the CLIB's header file(s), as follows:

    #define TCPIP_DYN_LINK
    #include <clib.h>


This compilation switch will map the original function's name to the dynamic link version.   In this manner, you can easily switch existing programs over to the dynamic link API.

Go here for a summary of hash method execution times.

Supported since or modified in @CHIP-RTOS version

    SC12SC13SC11SC1x3SC2x
    n/an/an/aV1.11V1.00

Supported by @CHIP-RTOS C Library since version

    CLIB
    V2.08

This API List
List of C Libraries
@CHIP-RTOS Main Index


End of document