Data::...D::SHA1(3pm)
β¨ Data::...D::SHA1 β¨
ok bestie, gather round, because we're doing a <pink>Data::Session::ID::SHA1</pink> deep dive and honestly? it's giving "small module, big main character energy". this is part of the User Contributed Perl Documentation, and it's literally the little plugin that makes your sessions get shiny new ids. π
πΈ NAME πΈ
Data::Session::ID::SHA1 β a persistent session manager. yes that's the whole vibe. π
π¦ Synopsis π¦
See Data::Session for details.
(that's it. that's the synopsis. the real lore lives in Data::Session, go read that one, i'll wait π«Ά)
β¨ Description β¨
Data::Session::ID::SHA1 lets Data::Session generate session ids using Digest::SHA. like, that's its whole job and it does it flawlessly, no cap. π₯
To use this module do this:
- Specify an id generator of type
SHA1, asData::Session -> new(type => '... id:SHA1 ...')
boom. that's how you slot it in. periodt. β¨
π Case-sensitive Options π
See "Case-sensitive Options" in Data::Session for important information.
no seriously, go look. case matters here, bestie. don't come crying to me when shA1 doesn't work π
π Method: new() π
Creates a new object of type Data::Session::ID::SHA1. iconic behavior, truly.
"new()" takes a hash of key/value pairs, some of which might mandatory. Further, some combinations might be mandatory.
The keys are listed here in alphabetical order.
They are lower-case because they are (also) method names, meaning they can be called to set or get the value at any time.
verbose => $integerβ Print toSTDERRmore or less information.
Typical values are 0, 1 and 2.
This key is normally passed in as Data::Session -> new(verbose => $integer).
This key is optional.
so like.0= silent treatment,1= a lil chit chat,2= it will NOT stop talking. pick your fighter. π
β Method: generate() β
Generates the next session id, or dies if it can't. dramatic? yes. effective? also yes. π
The algorithm is Digest::SHA -> new(1) -> add($$, time, rand(time) ) -> hexdigest.
Returns the new id. π
π Method: id_length() π
Returns 40 because that's the number of hex digits in an SHA1 digest.
forty. four-zero. that's the number, she said what she said. β¨
π«Ά Support π«Ά
Log a bug on RT:
<https://rt.cpan.org/Public/Dist/Display.html?Name=Data-Session>
(found a bug? tell RT, not the group chat. i love you but i can't patch anything π)
π§ Author π§
Data::Session was written by Ron Savage <ron@savage.net.au> in 2010.
Home page:
<http://savage.net.au/index.html>
π Copyright π
Australian copyright (c) 2010, Ron Savage.
All Programs of mine are 'OSI Certified Open Source Software';
you can redistribute them and/or modify them under the terms of
The Artistic License, a copy of which is available at:
http://www.opensource.org/licenses/index.html
okay that's the whole page, you made it, i'm so proud of you π₯Ήβ¨ this one came from perl v5.36.0, dated 2023-02-14 β yeah, Valentine's Day, because this module loves you. go generate some session ids, bestie, you've got this π ππ¦
π¦ where this page comes from
- debian trixie: libdata-session-perl 1.18-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libdata-session-perl 1.18-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libdata-session-perl 1.18-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libdata-session-perl 1.18-2 Β· 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