hashify.h File Reference
#include "pam_kmux_options.h"
#include <security/pam_ext.h>
#include <stdarg.h>
Go to the source code of 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_t9_md5 (const char *pass,...) |
| | Combining t9 and md5 encryption.
|
| const char * | encrypt_crypt (const char *pass,...) |
| | String encoding function.
|
Detailed Description
Password-encryption-API In this file all APIs related to password encryption are defined.
- 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:
-
- 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:
-
- 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:
-
- 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:
-
- 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:
-
- 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. |