Otcfgencrypt, Otcfgdecrypt – Apple Network Setup User Manual
Page 93

C H A P T E R 3
Network Setup Reference
Network Setup Functions
93
OTCfgEncrypt
3
Encrypts data.
SInt16 OTCCfgEncrypt (const UInt8 *key.
UInt8 *data,
SInt16 dataLen);
key
On input, a pointer to a Pascal string containing the encryption
key. For Remote Access password, the encryption key is a user
name.
data
On input, a pointer to an array of bytes that contains data that is
to be encrypted. Usually, the data is a password. On output,
data
contains the encrypted password.
dataLen
On input, a value of type
SInt16
that specifies the number of
bytes in the data array.
function result The length of the encrypted data.
DISCUSSION
The
OTCfgEncrypt
function encrypts the contents of the
data
parameter using the
key specified by the
key
parameter. For sample code, see Listing 2-17 in Chapter
Note
The
OTCCfgEncrypt
function is available in Network Setup
version 1.1 and later.
◆
OTCfgDecrypt
3
Decrypts data.
SInt16 OTCCfgDecrypt (const UInt8 *key.
UInt8 *data,
SInt16 dataLen);