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 the hash or the passphrase must 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 standard Authen::Passphrase interface. 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 (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