1Authen::Passphrase::NetUsscearpeCMoanitlr(i3b)uted PerlADuotchuemne:n:tPaatsisopnhrase::NetscapeMail(3)
2
3
4

NAME

6       Authen::Passphrase::NetscapeMail - passphrases using Netscape Mail
7       Server's method
8

SYNOPSIS

10               use Authen::Passphrase::NetscapeMail;
11
12               $ppr = Authen::Passphrase::NetscapeMail->new(
13                       salt => "8fd9d0a03491ce8f99cfbc9ab39f0dd5",
14                       hash_hex => "983757d7b519e86d9b5d472aca4eea3a");
15
16               $ppr = Authen::Passphrase::NetscapeMail->new(
17                       salt_random => 1,
18                       passphrase => "passphrase");
19
20               $ppr = Authen::Passphrase::NetscapeMail->from_rfc2307(
21                       "{NS-MTA-MD5}8fd9d0a03491ce8f99cfbc9ab39f0dd5".
22                       "983757d7b519e86d9b5d472aca4eea3a");
23
24               $salt = $ppr->salt;
25               $hash = $ppr->hash;
26               $hash_hex = $ppr->hash_hex;
27
28               if($ppr->match($passphrase)) { ...
29
30               $userPassword = $ppr->as_rfc2307;
31

DESCRIPTION

33       An object of this class encapsulates a passphrase hashed using the
34       algorithm used by Netscape Mail Server.  This is a subclass of
35       Authen::Passphrase, and this document assumes that the reader is
36       familiar with the documentation for that class.
37
38       The Netscape Mail Server scheme is based on the MD5 digest algorithm.
39       The passphrase and a salt are concatenated, along with some fixed
40       bytes, and this record is hashed through MD5.  The output of MD5 is the
41       password hash.
42
43       This algorithm is deprecated, and is supported for compatibility only.
44       Prefer the mechanism of Authen::Passphrase::SaltedDigest.
45

CONSTRUCTORS

47       Authen::Passphrase::NetscapeMail->new(ATTR => VALUE, ...)
48           Generates a new passphrase recogniser object using the Netscape
49           Mail Server algorithm.  The following attributes may be given:
50
51           salt
52               The salt, as a raw 32-byte string.  It may be any 32-byte
53               string, but it is conventionally limited to lowercase
54               hexadecimal digits.
55
56           salt_random
57               Causes salt to be generated randomly.  The value given for this
58               attribute is ignored.  The salt will be a string of 32
59               lowercase hexadecimal digits.  The source of randomness may be
60               controlled by the facility described in Data::Entropy.
61
62           hash
63               The hash, as a string of 16 bytes.
64
65           hash_hex
66               The hash, as a string of 32 hexadecimal digits.
67
68           passphrase
69               A passphrase that will be accepted.
70
71           The salt must be given, and either the hash or the passphrase.
72
73       Authen::Passphrase::NetscapeMail->from_rfc2307(USERPASSWORD)
74           Generates a new Netscape Mail Server passphrase recogniser object
75           from an RFC 2307 string.  The string must consist of "{NS-MTA-MD5}"
76           (case insensitive) followed by the hash in case-insensitive
77           hexadecimal and then the salt.  The salt must be exactly 32
78           characters long, and cannot contain any character that cannot
79           appear in an RFC 2307 string.
80

METHODS

82       $ppr->salt
83           Returns the salt value, as a string of 32 bytes.
84
85       $ppr->hash
86           Returns the hash value, as a string of 16 bytes.
87
88       $ppr->hash_hex
89           Returns the hash value, as a string of 32 hexadecimal digits.
90
91       $ppr->match(PASSPHRASE)
92       $ppr->as_rfc2307
93           These methods are part of the standard Authen::Passphrase
94           interface.
95

SEE ALSO

97       Authen::Passphrase, Digest::MD5
98

AUTHOR

100       Andrew Main (Zefram) <zefram@fysh.org>
101
103       Copyright (C) 2006, 2007, 2009, 2010, 2012 Andrew Main (Zefram)
104       <zefram@fysh.org>
105

LICENSE

107       This module is free software; you can redistribute it and/or modify it
108       under the same terms as Perl itself.
109
110
111
112perl v5.28.0                      2018-07-14Authen::Passphrase::NetscapeMail(3)
Impressum