File: crack.h

package info (click to toggle)
cracklib2 2.8.19-3
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 3,084 kB
  • sloc: sh: 11,170; ansic: 2,626; xml: 365; python: 279; makefile: 185; sed: 16
file content (34 lines) | stat: -rw-r--r-- 1,029 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#ifndef CRACKLIB_H
#define CRACKLIB_H

#ifdef __cplusplus
extern "C" {
#endif

/* Pass this function a password (pw) and a path to the
 * dictionaries (/usr/lib/cracklib_dict should be specified)
 * and it will either return a NULL string, meaning that the
 * password is good, or a pointer to a string that explains the
 * problem with the password.
 * You must link with -lcrack
 */

extern const char *FascistCheck(const char *pw, const char *dictpath);

/* This Debian specific method is a work-around for Debian #682735. Please
   do not rely on it being available in future verisons of cracklib2.
   Returns 1 (true) for success and 0 (false) in case an error occurred
   opening or reading the dictionary. In the later case, please check
   errno. */
extern int __DEBIAN_SPECIFIC__SafeFascistCheck(const char *pw,
				const char *dictpath, char **errmsg);

/* This function returns the compiled in value for DEFAULT_CRACKLIB_DICT.
 */
extern const char *GetDefaultCracklibDict(void);

#ifdef __cplusplus
};
#endif

#endif