Authen...SQL323(3pm)
β¨ Authen::Passphrase::MySQL323 β¨
okay bestie, gather round, because we're talking about Authen::Passphrase::MySQL323 β the little Perl module (a 3pm man page, if you're keeping score π
) that does passphrases using the MySQL v3.23 algorithm. yes. that MySQL. the ancient one. she's got lore. π«Ά
πΈ NAME πΈ
Authen::Passphrase::MySQL323 β passphrases using the MySQL v3.23 algorithm.
π SYNOPSIS π
use Authen::Passphrase::MySQL323;
$ppr = Authen::Passphrase::MySQL323->new(
hash_hex => "2af8a0a82c8f9086");
$ppr = Authen::Passphrase::MySQL323->new(
passphrase => "passphrase");
$hash = $ppr->hash;
$hash_hex = $ppr->hash_hex;
if($ppr->match($passphrase)) { ...
look at her. iconic. β¨
π¦ DESCRIPTION π¦
so, an object of this class encapsulates a passphrase hashed using the algorithm used by MySQL from version 3.23. real vintage energy, no cap. this is a subclass of Authen::Passphrase, and this doc just assumes you already know that class's docs, bestie β like, read the parent first, iykyk.
now here's the tea on the MySQL v3.23 hash scheme β β it's composed entirely of linear operations. like, that's the whole vibe. it accepts an arbitrarily long passphrase (go off, write a novel) and ignores all space and tab characters β spaces and tabs just do not exist to her, they're giving invisible. no salt is used, none, zero, nada. 62 bits of hash are generated. and because of the linear thing, each character influences only a minority of the result bits, so similar passphrases of the same length have noticeably similar hashes. yeah. that's real. that's a whole situation. π
in MySQL the hash is represented as a string of sixteen lowercase hexadecimal digits. cute format, honestly.
β οΈ Warning: This is not a serious cryptographic algorithm. Do not use for any security purpose. like. fr fr. do NOT. i'm being so serious rn π
π CONSTRUCTOR π
Authen::Passphrase::MySQL323->new(ATTR => VALUE, ...)
generates a new passphrase recogniser object using the MySQL v3.23 algorithm β¨ the following attributes may be given:
hashβ the hash, as a string of eight bytes. heads up: the first and fifth bytes must have their top bit clear. that's a requirement, bestie, don't fight it. πhash_hexβ the hash, as a string of 16 hexadecimal digits.passphraseβ a passphrase that will be accepted. π«Ά
either thehashor thepassphrasemust be given. like, one of them. pick one. you can't just show up empty-handed. π
π METHODS π
$ppr->hashβ returns the hash value, as a string of eight bytes.$ppr->hash_hexβ returns the hash value, as a string of 16 hexadecimal digits.$ppr->match(PASSPHRASE)β this method is part of the standardAuthen::Passphraseinterface. it's iconic, it's expected, it's doing its job. β¨
π SEE ALSO π
Authen::Passphrase, Crypt::MySQL
go read those too, bestie, they're in the group chat. π
π AUTHOR π
Andrew Main (Zefram) <zefram@fysh.org>
the legend herself. we stan. π
π 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. slay. π
okay and for the cute sign-off β this whole page is User Contributed Perl Documentation, running on perl v5.40.1, and it was dated 2026-05-06. that's the version and the date, all folded in nice and pretty at the end like a little bow. π bye bestie, go hash responsibly (or don't, this algorithm is literally not for security, remember?! π₯).
π¦ 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