Net::Jabber::Key(3)

πŸ’– Net::Jabber::Key πŸ’–

okay so bestie, welcome to the Net::Jabber::Key(3) page β€” that's the manpage title, and it lives in the User Contributed Perl Documentation section, just so you know where you are 🫢. Buckle up, this one's short but it's lowkey doing a lot.


✨ NAME ✨

Net::Jabber::Key β€” the Jabber Key Library πŸ‘‘


πŸ¦‹ SYNOPSIS πŸ¦‹

  Net::Jabber::Key is a module that provides a developer easy access
  to generating, caching, and comparing keys.

that's it, that's the whole vibe check: generating, caching, and comparing keys, handed to you on a lil platter. slay.


🌸 DESCRIPTION 🌸

so Key.pm is a helper module for Net::Jabber::Transport. here's the tea: when the Transport talks to a Client, it sends a key and expects to get that exact key back from the Client. this module gives you an API to generate the key, cache it, and then compare the key that got sent back from the Client. it's giving bouncer-at-the-club energy, honestly πŸ’….

πŸ’« Basic Functions

  $Key = new Net::Jabber::Key();

  $key = $Key->Generate();

  $key = $Key->Create("bob\@jabber.org");

  $test = $Key->Compare("bob\@jabber.org","some key");

those four lines? iconic. that's the whole lifecycle right there: birth, generate, create, compare. periodt πŸŽ€


πŸ‘‘ METHODS πŸ‘‘

🧚 Basic Functions

  • new(debug=>string, debugfh=>FileHandle, debuglevel=>integer) β€” creates the Key object ✨. debug should be set to the path where the debug log gets written. if you set it to "stdout", the debug goes there instead. also, you can pass in a filehandle that already exists and just use that one, which is honestly so convenient πŸ’–. debuglevel controls how much debug you get: 0 is none, 1 is normal, 2 is all β€” like a little dial from chill to feral πŸ™ˆ.
  • Generate() β€” returns a key in Digest SHA1 form, based on the current time and the PID πŸ”₯. time-based, process-based, no cap.
  • Create(cacheString) β€” generates a key and caches it under the key of cacheString. Create returns the key. so you get the key and it's stashed away, best of both worlds πŸ“.
  • Compare(cacheString, keyString) β€” compares the key stored in the cache under cacheString with the keyString. returns 1 if they match, and 0 otherwise. simple, clean, decisive πŸ’….

πŸ’œ AUTHOR πŸ’œ

By Ryan Eatmon in May of 2000 for http://jabber.org. a legend, fr fr 🌈.


This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. free as in freedom, bestie πŸ¦‹.


and that's the whole page!! πŸŽ‰ cute lil sign-off for you: this was perl v5.42.2, dated 2026-02-15, and it's the Net::Jabber::Key(3) manpage β€” go forth and compare those keys, you main character πŸ‘‘πŸ’–

πŸ“¦ where this page comes from