Data::...:SHA512(3pm)
β¨ Data::Session::ID::SHA512 β¨
okay bestie so this is a page from the User Contributed Perl Documentation section (that's the 3pm manual, iykyk) and it's literally all about Data::Session::ID::SHA512 π
π NAME π
Data::Session::ID::SHA512 β a persistent session manager π
πΈ Synopsis πΈ
See Data::Session for details. that's it, that's the synopsis, she's lowkey mysterious π¦
π¦ Description π¦
Data::Session::ID::SHA512 lets Data::Session generate session ids using Digest::SHA. no cap, that's the whole job and she does it gorgeously β¨
To use this module do this:
- Specify an id generator of type
SHA512, as inData::Session -> new(type => '... id:SHA512 ...')
periodt π
π Case-sensitive Options π
See "Case-sensitive Options" in Data::Session for important information. fr fr, go read it, it matters π
β Method: new() β
Creates a new object of type Data::Session::ID::SHA512. iconic behaviour, honestly π
new() takes a hash of key/value pairs, some of which might mandatory. Further, some combinations might be mandatory. (yes bestie, "might mandatory", that's exactly what it says, we don't gatekeep the original wording here π)
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. cute AND functional, we love a dual-purpose queen π
verbose => $integerβ print toSTDERRmore or less information. typical values are0,1and2. this key is normally passed in asData::Session -> new(verbose => $integer). this key is optional π«Ά
π₯ Method: generate() π₯
Generates the next session id, or dies if it can't. dramatic but fair π
The algorithm is Digest::SHA -> new(512) -> add($$, time, rand(time) ) -> hexdigest.
Returns the new id. slay β¨
π Method: id_length() π
Returns 128 because that's the number of hex digits in an SHA512 digest. math ate, no crumbs π§
This can be used to generate the SQL to create the sessions table. very helpful of her ngl π
π Support π
Log a bug on RT: <https://rt.cpan.org/Public/Dist/Display.html?Name=Data-Session>.
π 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
and that's the whole page bestie π this was perl v5.36.0, dated 2023-02-14, straight from Data::...:SHA512(3pm) β go forth and generate some gorgeous session ids, ily, bye π
β¨
π¦ 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