1docs::api::APR::Util(3)User Contributed Perl Documentatiodnocs::api::APR::Util(3)
2
3
4

NAME

6       APR::Util - Perl API for Various APR Utilities
7

Synopsis

9         use APR::Util ();
10
11         $ok = password_validate($passwd, $hash);
12

Description

14       Various APR utilities that don't fit into any other group.
15

API

17       "APR::Util" provides the following functions and/or methods:
18
19       "password_validate"
20
21       Validate an encrypted password hash against a plain text password (with
22       lots of restrictions and peculiarities).
23
24         $ok = password_validate($passwd, $hash);
25
26       arg1: $passwd ( string )
27           Plain text password string
28
29       arg2: $hash ( string )
30           Encrypted or encoded hash. See below for supported hash formats.
31
32       ret: $ok ( boolean )
33           The password either matches or not.
34
35       since: 2.0.00
36
37       The function handles the output of the following functions (it knows to
38       tell md5 and sha1 from the others, since they are have a special pat‐
39       tern recognized by apr):
40
41       * md5
42           generated by "apr_md5_encode()" (for which at the moment we have no
43           perl glue, ask if you need it).
44
45       * sha1
46           generated by "apr_sha1_base64()" (for which at the moment we have
47           no perl glue, ask if you need it).
48
49           and it's available only since Apache 2.0.50
50
51       * crypt
52           On all but the following platforms: MSWin32, beos and NetWare.
53           Therefore you probably don't want to use that feature, unless you
54           know that your code will never end up running on those listed plat‐
55           forms.
56
57           Moreover on these three platforms if that function sees that the
58           hash is not of md5 and sha1 formats, it'll do a clear to clear text
59           matching, always returning success, no matter what the hashed value
60           is.
61
62       Warning: double check that you understand what this function does and
63       does not before using it.
64

Unsupported API

66       "APR::Socket" also provides auto-generated Perl interface for a few
67       other methods which aren't tested at the moment and therefore their API
68       is a subject to change. These methods will be finalized later as a need
69       arises. If you want to rely on any of the following methods please con‐
70       tact the the mod_perl development mailing list so we can help each
71       other take the steps necessary to shift the method to an officially
72       supported API.
73
74       "filepath_name_get"
75
76       META: Autogenerated - needs to be reviewed/completed
77
78       [We have File::Spec and File::Basename for this purpose, I can't see
79       why this api is needed]
80
81       return the final element of the pathname
82
83         $ret = filepath_name_get($pathname);
84
85       arg1: $pathname ( string )
86           The path to get the final element of
87
88       ret: $ret ( string )
89           the final element of the path
90
91           For example:
92
93             "/foo/bar/gum"    => "gum"
94             "/foo/bar/gum/"   => ""
95             "gum"             => "gum"
96             "bs\\path\\stuff" => "stuff"
97
98       since: subject to change
99
100       "password_get"
101
102       META: Autogenerated - needs to be reviewed/completed
103
104       Display a prompt and read in the password from stdin.
105
106         $ret = password_get($prompt, $pwbuf, $bufsize);
107
108       arg1: $prompt ( string )
109           The prompt to display
110
111       arg2: $pwbuf ( string )
112           Buffer to store the password
113
114       arg3: $bufsize (number)
115           The length of the password buffer.
116
117       ret: $ret (integer)
118       since: subject to change
119

See Also

121       mod_perl 2.0 documentation.
122
124       mod_perl 2.0 and its core modules are copyrighted under The Apache
125       Software License, Version 2.0.
126

Authors

128       The mod_perl development team and numerous contributors.
129
130
131
132perl v5.8.8                       2006-11-19           docs::api::APR::Util(3)
Impressum