jamroll has asked for the wisdom of the Perl Monks concerning the following question:
does it have a limit on the size of the string being passed in?
the above prints "yup", not "nope" as you might expect....seems crypt does have a limit, although the doc i reference doesn't state the existence of such a limit. is there an equivalent which operates exactly the same?#!/usr/bin/perl # must have's! use strict; use warnings; use CGI::Carp qw(fatalsToBrowser); use DBI; use URI::Escape; use lib "/var/www/html/Pm"; my $pw = "Aardvark"; # 8 characters my $salt = "ab"; my $pwCrypted = crypt($pw, $salt); print "content-type: text/plain\n\n"; if (crypt("Aardvarks", $salt) eq $pwCrypted) { print "yup" } else { pr +int "nope"; } exit 1;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: crypt function has string length limit?
by Eily (Monsignor) on Jul 24, 2017 at 15:35 UTC | |
|
Re: crypt function has string length limit?
by Anonymous Monk on Jul 24, 2017 at 15:29 UTC | |
| A reply falls below the community's threshold of quality. You may see it by logging in. |