Middleware, development tools, realtime operating system
software and services for superior embedded design


Home
QNX Community Resources
Developer Support
QNX Documentation Library
QNX Developer Support

QNX Developer Support

QNX Software Systems
Developer Resources
Blogs
Board support packages
Foundry27 projects
Forums
Hardware support listing
Online video tutorials
Product documentation
Technical Articles

[Previous] [Contents] [Index] [Next]

encrypt()

Encrypt a string

Synopsis:

#include <unistd.h>

void encrypt( char block[64], 
              int flag );

Arguments:

block
A 64-character array of binary values to encrypt. The function stores the encrypted value in the same array.
flag
If the value of flag is 0, the function encrypts block; otherwise, encrypt() fails.

Library:

libc

Use the -l c option to qcc to link against this library. This library is usually included automatically.


Note: This function is in libc.a, but not in libc.so (in order to save space).

Description:

The encrypt() function uses the NBS Data Encryption Standard (DES) algorithm and the key you specify by calling setkey() to encrypt the given block of data.

Classification:

POSIX 1003.1 XSI

Safety:
Cancellation point No
Interrupt handler No
Signal handler Yes
Thread Yes

See also:

crypt(), setkey()


[Previous] [Contents] [Index] [Next]