Sha1() - VeriFone MX800 series Programmer's Manual

Hide thumbs Also See for MX800 series:
Table of Contents

Advertisement

D
D
EVICE
RIVERS

SHA1()

SHA1()
84
M
X
800 S
P
ERIES
ROGRAMMERS
This function performs a SHA-1 computation as described in FIPS PUB 180-2. It
returns a 20-byte message digest. Due to the underlying messaging interface, it
can process a maximum of 1024 bytes per call.
Prototype
int SHA1 (unsigned char * int option, unsigned char * input_buffer,
unsigned long nb, unsigned char * sha20)
Parameters
option
SHA1INIT
SHA1BUFF
SHA1TERM
SHA1ALL
Pointer to the input buffer holding the message to be processed.
input_buffer
Number of bytes in the buffer. Maximum value is 1024.
nb
Pointer to the 20-byte buffer where the message digest will be
sha20
transferred.
Return Values
0
Successful execution
< 0
Error
G
UIDE
First call. The SHA-1 engine is initialized before
processing the data. No digest is returned.
Intermediate call. It feeds the SHA-1 engine more
data. No digest is returned.
Final call. The 20-byte digest is returned after the
data is processed.
One-step operation combining all the options
above.

Advertisement

Table of Contents
loading

Table of Contents