Back to index

glibc  2.9
Defines | Functions
des_crypt.h File Reference
#include <features.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define DES_MAXDATA   8192 /* max bytes encrypted in one call */
#define DES_DIRMASK   (1 << 0)
#define DES_ENCRYPT   (0*DES_DIRMASK) /* Encrypt */
#define DES_DECRYPT   (1*DES_DIRMASK) /* Decrypt */
#define DES_DEVMASK   (1 << 1)
#define DES_HW   (0*DES_DEVMASK) /* Use hardware device */
#define DES_SW   (1*DES_DEVMASK) /* Use software device */
#define DESERR_NONE   0 /* succeeded */
#define DESERR_NOHWDEVICE   1 /* succeeded, but hw device not available */
#define DESERR_HWERROR   2 /* failed, hardware/driver error */
#define DESERR_BADPARAM   3 /* failed, bad parameter to call */
#define DES_FAILED(err)   ((err) > DESERR_NOHWDEVICE)

Functions

int cbc_crypt (char *__key, char *__buf, unsigned __len, unsigned __mode, char *__ivec) __THROW
int ecb_crypt (char *__key, char *__buf, unsigned __len, unsigned __mode) __THROW
void des_setparity (char *__key) __THROW

Define Documentation

#define DES_DECRYPT   (1*DES_DIRMASK) /* Decrypt */

Definition at line 46 of file des_crypt.h.

#define DES_DEVMASK   (1 << 1)

Definition at line 49 of file des_crypt.h.

#define DES_DIRMASK   (1 << 0)

Definition at line 44 of file des_crypt.h.

#define DES_ENCRYPT   (0*DES_DIRMASK) /* Encrypt */

Definition at line 45 of file des_crypt.h.

#define DES_FAILED (   err)    ((err) > DESERR_NOHWDEVICE)

Definition at line 59 of file des_crypt.h.

#define DES_HW   (0*DES_DEVMASK) /* Use hardware device */

Definition at line 50 of file des_crypt.h.

#define DES_MAXDATA   8192 /* max bytes encrypted in one call */

Definition at line 43 of file des_crypt.h.

#define DES_SW   (1*DES_DEVMASK) /* Use software device */

Definition at line 51 of file des_crypt.h.

#define DESERR_BADPARAM   3 /* failed, bad parameter to call */

Definition at line 57 of file des_crypt.h.

#define DESERR_HWERROR   2 /* failed, hardware/driver error */

Definition at line 56 of file des_crypt.h.

#define DESERR_NOHWDEVICE   1 /* succeeded, but hw device not available */

Definition at line 55 of file des_crypt.h.

#define DESERR_NONE   0 /* succeeded */

Definition at line 54 of file des_crypt.h.


Function Documentation

int cbc_crypt ( char *  __key,
char *  __buf,
unsigned  __len,
unsigned  __mode,
char *  __ivec 
)
void des_setparity ( char *  __key)

Definition at line 61 of file des_soft.c.

{
  int i;

  for (i = 0; i < 8; i++)
    {
      *p = partab[*p & 0x7f];
      p++;
    }
}

Here is the caller graph for this function:

int ecb_crypt ( char *  __key,
char *  __buf,
unsigned  __len,
unsigned  __mode 
)

Here is the caller graph for this function: