DEVICE DRIVERS
DES()
M
X
800 SERIES PROGRAMMERS GUIDE 85
DES()
This function performs DES, DESX and Triple-DES computations. The operation
type and key length are specified using the parameter ucDeaOption.
Prototype
int DES (unsigned char ucDeaOption,
unsigned char *pucDeaKey8N,
unsigned char *pucInputData,
unsigned char *pucOutputData)
Parameters
Return Values
ucDeaOption Algorithm
pucDeaKey8N Pointer to 8N-byte key block (N=1, 2 or 3)
pucInputData Pointer to 8-byte input block
pucOutputDat
a
Pointer to 8-byte output block
0 Successful execution
Less than 0 Error
DESX1KE(02h) DEAX encryption with single-length key
DESX1KD(03h) DEAX encryption with single-length key
DESX2KE(04h) DEAX encryption with double-length key
DESX2KD(05h) DEAX encryption with double-length key
DESX3KE(06h) DEAX encryption with triple-length key
DESX3KD(07h) DEAX encryption with triple-length key
DESE(08h) DEA encryption with single-length key
DESD(09h) DEA encryption with single-length key
TDES2KE(0Ch) TDEA encryption with double-length key
TDES2KD(0Dh) TDEA encryption with double-length key
TDES3KE(0Eh) TDEA encryption with triple-length key
TDES3KD(0Fh) TDEA encryption with triple-length key