#include "services.h"
#include "encrypt.h"
Go to the source code of this file.
Functions | |
| int | enc_check_password (const char *plaintext, const char *password) |
| int | enc_decrypt (const char *src, char *dest, int size) |
| int | enc_encrypt (const char *src, int len, char *dest, int size) |
| int | enc_encrypt_check_len (int passlen, int bufsize) |
| int | enc_encrypt_in_place (char *buf, int size) |
| void | encmodule_check_password (int(*func)(const char *plaintext, const char *password)) |
| void | encmodule_decrypt (int(*func)(const char *src, char *dest, int size)) |
| void | encmodule_encrypt (int(*func)(const char *src, int len, char *dest, int size)) |
| void | encmodule_encrypt_check_len (int(*func)(int passlen, int bufsize)) |
| void | encmodule_encrypt_in_place (int(*func)(char *buf, int size)) |
Variables | |
| Encryption | encryption |
| int enc_check_password | ( | const char * | plaintext, | |
| const char * | password | |||
| ) |
Check an input password `plaintext' against a stored, encrypted password `password'. Return value is: 1 if the password matches 0 if the password does not match -1 if an error occurred while checking
Definition at line 114 of file encrypt.c.
References encryption_::check_password, and encryption.
Referenced by do_ghost(), do_identify(), do_recover(), and do_release().
| int enc_decrypt | ( | const char * | src, | |
| char * | dest, | |||
| int | size | |||
| ) |
Decrypt encrypted string `src' into buffer `dest' of length `len'. Returns 1 (not 0) on success, 0 if the encryption algorithm does not allow decryption, and -1 if another failure occurred (e.g. destination buffer too small).
Definition at line 99 of file encrypt.c.
References encryption_::decrypt, and encryption.
Referenced by db_mysql_secure(), do_confirm(), do_getpass(), do_register(), do_saset_password(), do_sendpass(), and do_set_password().
| int enc_encrypt | ( | const char * | src, | |
| int | len, | |||
| char * | dest, | |||
| int | size | |||
| ) |
Encrypt string `src' of length `len', placing the result in buffer `dest' of size `size'. Returns 0 on success, -1 on error.
Definition at line 56 of file encrypt.c.
References encryption_::encrypt, and encryption.
Referenced by do_confirm(), do_saset_password(), and do_set_password().
| int enc_encrypt_check_len | ( | int | passlen, | |
| int | bufsize | |||
| ) |
Check whether the result of encrypting a password of length `passlen' will fit in a buffer of size `bufsize'. Returns 0 if the encrypted password would fit in the buffer, otherwise returns the maximum length password that would fit (this value will be smaller than `passlen'). If the result of encrypting even a 1-byte password would exceed the specified buffer size, generates a fatal error.
Definition at line 85 of file encrypt.c.
References encryption_::encrypt_check_len, and encryption.
| int enc_encrypt_in_place | ( | char * | buf, | |
| int | size | |||
| ) |
Encrypt null-terminated string stored in buffer `buf' of size `size', placing the result in the same buffer. Returns 0 on success, -1 on error.
Definition at line 69 of file encrypt.c.
References encryption_::encrypt_in_place, and encryption.
Referenced by do_register().
| void encmodule_check_password | ( | int(*)(const char *plaintext, const char *password) | func | ) |
Definition at line 42 of file encrypt.c.
References encryption_::check_password, and encryption.
Referenced by AnopeFini(), and AnopeInit().
| void encmodule_decrypt | ( | int(*)(const char *src, char *dest, int size) | func | ) |
Definition at line 37 of file encrypt.c.
References encryption_::decrypt, and encryption.
Referenced by AnopeFini(), and AnopeInit().
| void encmodule_encrypt | ( | int(*)(const char *src, int len, char *dest, int size) | func | ) |
Definition at line 21 of file encrypt.c.
References encryption_::encrypt, and encryption.
Referenced by AnopeFini(), and AnopeInit().
| void encmodule_encrypt_check_len | ( | int(*)(int passlen, int bufsize) | func | ) |
Definition at line 32 of file encrypt.c.
References encryption_::encrypt_check_len, and encryption.
Referenced by AnopeFini(), and AnopeInit().
| void encmodule_encrypt_in_place | ( | int(*)(char *buf, int size) | func | ) |
Definition at line 27 of file encrypt.c.
References encryption_::encrypt_in_place, and encryption.
Referenced by AnopeFini(), and AnopeInit().
Definition at line 18 of file encrypt.c.
Referenced by enc_check_password(), enc_decrypt(), enc_encrypt(), enc_encrypt_check_len(), enc_encrypt_in_place(), encmodule_check_password(), encmodule_decrypt(), encmodule_encrypt(), encmodule_encrypt_check_len(), and encmodule_encrypt_in_place().
1.5.1-20070107