Cryptowrite() - VeriFone MX800 series Programmer's Manual

Hide thumbs Also See for MX800 series:
Table of Contents

Advertisement

cryptoWrite()

The File Encryption feature can be used in order to guarantee that the file content
will be lost if the unit is tampered with. The file is encrypted with a variant of a key
that is erased from the terminal in case of attack, making impossible to recover
the content of the encrypted file. The key is unique per terminal and is not known
outside the cryptographic unit of the terminal.
This feature can be used, for instance, when tamper detection must cause the
deletion the transaction batch file.
cryptoWrite() encrypts and writes count bytes of data from buffer to the open
file associated with handle. It returns the number of bytes actually written. All
writes must be done going forward in the file because data at one location affect
the decryption of the data further in the file. Another consequence is that the file
must be opened for both reading and writing (i.e. if the file was opened with flag
O_WRONLY set, the function returns –1 and errno set to EBADF).
Prototype
int cryptoWrite (int handle, const char *buffer, int count)
Parameters
File handle
handle
Pointer to the buffer holding the input data
buffer
Number of byes to write
count
Return Values
0
Successful execution
1
File Error, errno is set accordingly.
< 1
System Error
D
X
M
800 S
P
ERIES
ROGRAMMERS
D
EVICE
RIVERS
cryptoWrite()
81
G
UIDE

Advertisement

Table of Contents
loading

Table of Contents