hashify.c File Reference

#include "common.h"
#include "backend_common.h"
#include <mhash.h>
#include "md5.h"
Include dependency graph for hashify.c:
This graph shows which files directly or indirectly include this file:

Functions

const char * password_encrypt (const char *pass, const char *salt, const modopt_t *options)
 Encrypt a password.
const char * encrypt_t9 (const char *pass,...)
 Encrypt a password using t9-algorithm.
const char * encrypt_md5 (const char *pass,...)
 Encrypt a password using md5-algorithm.
const char * encrypt_sha1 (const char *pass,...)
 Encrypt a password using sha1-algorithm.
const char * encrypt_clear (const char *pass,...)
 Using cleartext password.
const char * encrypt_crypt (const char *pass,...)
 String encoding function.
const char * encrypt_t9_md5 (const char *pass,...)
 Combining t9 and md5 encryption.

Variables

pam_modopt_t pamod_options

Detailed Description

Hash Algorithms. This files contains all hash algorithms to encrypt the

Author:
Julian Thome
Date:
2009-11-11

Function Documentation

const char* encrypt_clear ( const char *  pass,
  ... 
)

Using cleartext password.

This function returns only the cleartext password.

Parameters:
pass The user password.
Return values:
const char* The encrypted password.
NULL if something went wrong.
const char* encrypt_crypt ( const char *  pass,
  ... 
)

String encoding function.

This function first generate a t9 hash and encrypt this hash with md5.

Parameters:
pass The user password. The second parameter is the salt (const char*) Parameter which will be used to generate a hash. The third parameter is the options (modopt_t) Parameter which contains the encryption type.
Return values:
const char* The encrypted password.
NULL if something went wrong.
const char* encrypt_md5 ( const char *  pass,
  ... 
)

Encrypt a password using md5-algorithm.

This function generates a md5 hash from pass.

Parameters:
pass The user password.
Return values:
const char* The encrypted password.
NULL if something went wrong.
const char* encrypt_sha1 ( const char *  pass,
  ... 
)

Encrypt a password using sha1-algorithm.

This function generates a sha1 hash from pass.

Parameters:
pass The user password.
Return values:
const char* The encrypted password.
NULL if something went wrong.
const char* encrypt_t9 ( const char *  pass,
  ... 
)

Encrypt a password using t9-algorithm.

This function generates a t9 hash from pass.

Parameters:
pass The user password.
Return values:
const char* The encrypted password.
NULL if something went wrong.
const char* encrypt_t9_md5 ( const char *  pass,
  ... 
)

Combining t9 and md5 encryption.

This function first generate a t9 hash and encrypt this hash with md5.

Parameters:
pass The user password.
Return values:
const char* The encrypted password.
NULL if something went wrong.
const char* password_encrypt ( const char *  pass,
const char *  salt,
const modopt_t options 
)

Encrypt a password.

This functinos takes the userpassword and encrypt it to the type specified in the modopt_t-struct options respectively the salt parameter.

Parameters:
pass The user password.
salt If you want to hashify your password with additional information which will be computed in in the new hash.
options A modopt_t struct, which contains the hashtype.
Return values:
char* The encrypted password.
NULL if something went wrong.

Variable Documentation

C-Structure which contains pam-module options. In this global variable the pam-module options like debug level or the path of the configuration file are stored.

Generated on Mon Apr 5 22:28:47 2010 for pam_kmux by  doxygen 1.6.3