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

Unsupported API

68       "APR::Socket" also provides auto-generated Perl interface for a few
69       other methods which aren't tested at the moment and therefore their API
70       is a subject to change. These methods will be finalized later as a need
71       arises. If you want to rely on any of the following methods please
72       contact the the mod_perl development mailing list so we can help each
73       other take the steps necessary to shift the method to an officially
74       supported API.
75
76   "filepath_name_get"
77       META: Autogenerated - needs to be reviewed/completed
78
79       [We have File::Spec and File::Basename for this purpose, I can't see
80       why this api is needed]
81
82       return the final element of the pathname
83
84         $ret = filepath_name_get($pathname);
85
86       arg1: $pathname ( string )
87           The path to get the final element of
88
89       ret: $ret ( string )
90           the final element of the path
91
92           For example:
93
94             "/foo/bar/gum"    => "gum"
95             "/foo/bar/gum/"   => ""
96             "gum"             => "gum"
97             "bs\\path\\stuff" => "stuff"
98
99       since: subject to change
100
101   "password_get"
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.12.0                      2007-11-12           docs::api::APR::Util(3)
Impressum