Authen...peMail(3pm)
π Authen::Passphrase::NetscapeMail β the 3pm manual, but make it cute
okay bestie, so this is a page from the User Contributed Perl Documentation, and it's about Authen::Passphrase::NetscapeMail β literally passphrases using Netscape Mail Server's method. yes, that Netscape. we're going vintage π
β¨ NAME β¨
Authen::Passphrase::NetscapeMail β passphrases using Netscape Mail Server's method π«Ά
πΈ SYNOPSIS πΈ
here's the vibe, copy-paste ready:
use Authen::Passphrase::NetscapeMail;
$ppr = Authen::Passphrase::NetscapeMail->new(
salt => "8fd9d0a03491ce8f99cfbc9ab39f0dd5",
hash_hex => "983757d7b519e86d9b5d472aca4eea3a");
$ppr = Authen::Passphrase::NetscapeMail->new(
salt_random => 1,
passphrase => "passphrase");
$ppr = Authen::Passphrase::NetscapeMail->from_rfc2307(
"{NS-MTA-MD5}8fd9d0a03491ce8f99cfbc9ab39f0dd5".
"983757d7b519e86d9b5d472aca4eea3a");
$salt = $ppr->salt;
$hash = $ppr->hash;
$hash_hex = $ppr->hash_hex;
if($ppr->match($passphrase)) { ...
$userPassword = $ppr->as_rfc2307;
π¦ DESCRIPTION π¦
so. an object of this class encapsulates a passphrase hashed using the algorithm used by Netscape Mail Server. it's a subclass of Authen::Passphrase, and this doc is assuming you already know your way around that class, mkay? go read that one first, it's giving prerequisite energy β¨
The Netscape Mail Server scheme is based on the MD5 digest algorithm. here's the recipe: the passphrase and a salt get concatenated together, along with some fixed bytes, and then that whole record gets hashed through MD5. the output of MD5 is the password hash. that's it, that's the whole thing π₯
β οΈ okay real talk: this algorithm is deprecated. it's supported for compatibility only. like, we're not judging, but please prefer the mechanism of Authen::Passphrase::SaltedDigest. periodt.
π CONSTRUCTORS π
Authen::Passphrase::NetscapeMail->new(ATTR => VALUE, ...)
spins up a brand new passphrase recogniser object using the Netscape Mail Server algorithm. here are the attributes you can hand it:
saltβ the salt, as a raw 32-byte string. technically it can be any 32-byte string, but conventionally it's limited to lowercase hexadecimal digits. that's the look πsalt_randomβ makes thesaltget generated randomly for you. whatever value you give this attribute is literally ignored, it does not care. the salt will be a string of 32 lowercase hexadecimal digits. spontaneous salt, iconic π§hashβ the hash, as a string of 16 bytes.hash_hexβ the hash, as a string of 32 hexadecimal digits.passphraseβ a passphrase that will be accepted.
π the rules, bestie: thesaltmust be given, and then you need either thehashor thepassphrase. pick one, no cap.
Authen::Passphrase::NetscapeMail->from_rfc2307(USERPASSWORD)
makes you a fresh Netscape Mail Server passphrase recogniser object out of an RFC 2307 string. πͺ
the string has to be: "{NS-MTA-MD5}" (case insensitive) followed by the hash in case-insensitive hexadecimal, and then the salt. the salt must be exactly 32 characters long, and it cannot contain any character that can't appear in an RFC 2307 string. strict queen behavior, honestly π
π METHODS π
$ppr->saltβ returns the salt value, as a string of 32 bytes.$ppr->hashβ returns the hash value, as a string of 16 bytes.$ppr->hash_hexβ returns the hash value, as a string of 32 hexadecimal digits.$ppr->match(PASSPHRASE)$ppr->as_rfc2307
the last two? they're part of the standard Authen::Passphrase interface. standard, but still slaying β¨
π SEE ALSO π
Authen::PassphraseDigest::MD5
π AUTHOR π
Andrew Main (Zefram) <zefram@fysh.org>
π COPYRIGHT π
Copyright (C) 2006, 2007, 2009, 2010, 2012 Andrew Main (Zefram) <zefram@fysh.org>
π LICENSE π
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
okay that's the whole page, bestie, you ate it π«Ά go forth and hash responsibly (or honestly, go use Authen::Passphrase::SaltedDigest). mwah π
sign-off: this little gem comes from perl v5.40.1 and it was dated 2026-05-06 β bye bye, love u π¦β¨
π¦ where this page comes from
- ubuntu stonking: libauthen-passphrase-perl 0.009-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms