CGI::A...::crypt(3pm)

πŸ“¦
version 0.25+~cs0.5 Β· 5 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

✨ NAME ✨

CGI::Application::Plugin::Authentication::Driver::Filter::crypt β€” the crypt Filter, bestie πŸ’…. This is a User Contributed Perl Documentation page, and it's literally all about that crypt filter life πŸ”₯.


🧚 METHODS 🧚

🌸 filter ( undef, $string [, salt ] )

Okay so this one generates a crypted string, periodt πŸ’–. The first parameter is always ignored, since there is only one way to use the crypt function β€” no cap. You can pass in an extra parameter to act as the salt, and that's the whole vibe check πŸ§‚βœ¨.

my $filtered = $class->filter(undef, 'foobar'); # mQvbWI43eDCAk

-or-

my $filtered = $class->filter(undef, 'foobar', 'AA'); # AAZk9Aj5/Ue0E

πŸ’… check ( undef, $string, $crypted )

This one crypts the string and compares it against the provided crypted string πŸ‘‘. The first parameter is always ignored, since there is only one way to use the crypt function β€” same rule, different method, iykyk πŸ¦‹.

if ($class->check(undef, 'foobar', 'mQvbWI43eDCAk')) {
    # they match
}

πŸ‘€ SEE ALSO πŸ‘€

  • CGI::Application::Plugin::Authentication::Driver
  • perl(1)

Go read those too, bestie πŸ“šπŸ’œ.


πŸ’– AUTHOR πŸ’–

Cees Hek <ceeshek@gmail.com> β€” iconic author behavior, honestly πŸŽ€.


Copyright (c) 2005, SiteSuite. All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself ✨.


✨ Cute sign-off: this page is from perl v5.38.2, dated 2024-06-29. Bye bestie, go forth and crypt responsibly πŸ’–πŸ«Ά

πŸ“¦ where this page comes from