17 #ifndef _PASSWD_COMMON_H
18 #define _PASSWD_COMMON_H
27 #if !APR_VERSION_AT_LEAST(2,0,0)
31 #if !defined(WIN32) && !defined(NETWARE)
35 #define MAX_STRING_LEN 256
42 #define ALG_CRYPT_SHA256 5
43 #define ALG_CRYPT_SHA512 6
45 #define BCRYPT_DEFAULT_COST 5
47 #define ERR_FILEPERM 1
49 #define ERR_PWMISMATCH 3
50 #define ERR_INTERRUPTED 4
51 #define ERR_OVERFLOW 5
56 #define ERR_ALG_NOT_SUPP 10
58 #define NL APR_EOL_STR
60 #if defined(WIN32) || defined(NETWARE)
61 #define CRYPT_ALGO_SUPPORTED 0
62 #define PLAIN_ALGO_SUPPORTED 1
64 #define CRYPT_ALGO_SUPPORTED 1
65 #define PLAIN_ALGO_SUPPORTED 0
68 #if APR_VERSION_AT_LEAST(2,0,0) || \
69 (APU_MAJOR_VERSION == 1 && APU_MINOR_VERSION >= 5)
70 #define BCRYPT_ALGO_SUPPORTED 1
72 #define BCRYPT_ALGO_SUPPORTED 0
75 #if APR_CHARSET_EBCDIC
76 #undef BCRYPT_ALGO_SUPPORTED
77 #define BCRYPT_ALGO_SUPPORTED 0
APR Platform Definitions.
APR Miscellaneous library routines.
APR general purpose library routines.
APR Versioning Interface.
APR-util Versioning Interface.
struct apr_pool_t apr_pool_t
Definition: apr_pools.h:60
int get_password(struct passwd_ctx *ctx)
int mkhash(struct passwd_ctx *ctx)
int parse_common_options(struct passwd_ctx *ctx, char opt, const char *opt_arg)
void putline(apr_file_t *f, const char *l)
Definition: apr_arch_file_io.h:107
Definition: lua_passwd.h:68
char * out
Definition: lua_passwd.h:71
apr_size_t out_len
Definition: lua_passwd.h:72
int cost
Definition: lua_passwd.h:75
char * passwd
Definition: lua_passwd.h:73
int alg
Definition: lua_passwd.h:74
@ PW_ARG
Definition: passwd_common.h:96
@ PW_STDIN
Definition: passwd_common.h:97
@ PW_PROMPT_VERIFY
Definition: passwd_common.h:98
@ PW_PROMPT
Definition: passwd_common.h:95
apr_pool_t * pool
Definition: lua_passwd.h:69
const char * errstr
Definition: lua_passwd.h:70
enum passwd_ctx::@23 passwd_src