{"id":6882,"date":"2022-12-20T19:34:15","date_gmt":"2022-12-20T22:34:15","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/datapasswordmeter-man3\/"},"modified":"2022-12-20T19:34:15","modified_gmt":"2022-12-20T22:34:15","slug":"datapasswordmeter-man3","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/datapasswordmeter-man3\/","title":{"rendered":"Data::Password::Meter (man3)"},"content":{"rendered":"<h1 align=\"center\">Data::Password::Meter<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#ATTRIBUTES\">ATTRIBUTES<\/a><br \/> <a href=\"#METHODS\">METHODS<\/a><br \/> <a href=\"#ERROR MESSAGES\">ERROR MESSAGES<\/a><br \/> <a href=\"#DEPENDENCIES\">DEPENDENCIES<\/a><br \/> <a href=\"#AVAILABILITY\">AVAILABILITY<\/a><br \/> <a href=\"#COPYRIGHT AND LICENSE\">COPYRIGHT AND LICENSE<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Data::Password::Meter \u2212 Check the strength of passwords<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">my $pwdm = Data::Password::Meter\u2212>new(28); <br \/> # Check a password <br \/> if ($pwdm\u2212>strong(&#8216;s3cur3\u2212p4ssw0rd&#8217;)) { <br \/> print &#8220;The password is strong enough!n&#8221;; <br \/> print &#8216;Scored &#8216; . $pwdm\u2212>score . &#8216; points!&#8217;; <br \/> } <br \/> else { <br \/> warn $pwdm\u2212>errstr; <br \/> };<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Check the strength of a password. The scoring is based on Passwordmeter <http:\/\/www.geekwisdom.com\/js\/passwordmeter.js> by Steve Moitozo.<\/p>\n<h2>ATTRIBUTES <a name=\"ATTRIBUTES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>err<\/b> <br \/> print $pwdm\u2212>err;<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The error code of the last check. Returns a &#8220;false&#8221; value, if the last check was successful.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>errstr<\/b> <br \/> print $pwdm\u2212>errstr; <br \/> print $pwdm\u2212>errstr(4);<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The error string of the last check, or, in case an error code is passed, the corresponding message. Returns an empty string, if the last check was successful.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>score<\/b> <br \/> print $pwdm\u2212>score;<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The score of the last check.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>threshold<\/b> <br \/> print $pwdm\u2212>threshold; <br \/> $pwdm\u2212>threshold(28);<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The scoring threshold, the determining factor when a password is too weak. Every password that is below this threshold is considered weak. Defaults to a score of 25.<\/p>\n<h2>METHODS <a name=\"METHODS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>new<\/b> <br \/> my $pwd = Data::Password::Meter\u2212>new(28);<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Constructs a new password check object. Accepts an optional value for the threshold.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>strong<\/b> <br \/> if ($pwdm\u2212>strong(&#8216;mypassword&#8217;)) { <br \/> print &#8216;This password is strong!&#8217;; <br \/> } <br \/> else { <br \/> print &#8216;This password is weak!&#8217;; <br \/> };<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Checks a password for strength. Returns a false value in case the password is considered to be weak.<\/p>\n<h2>ERROR MESSAGES <a name=\"ERROR MESSAGES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Possible error codes and strings are:<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"86%\">\n<p>1. There is no password given<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"86%\">\n<p>2. Passwords are not allowed to contain control sequences<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"86%\">\n<p>3. Passwords are not allowed to consist of repeating characters only<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"86%\">\n<p>4. The password is too short<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"86%\">\n<p>5. The password should contain special characters<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"86%\">\n<p>6. The password should contain combinations of letters, numbers and special characters<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"86%\">\n<p>7. The password is too short and should contain special characters<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"86%\">\n<p>8. The password is too short and should contain combinations of letters, numbers and special characters<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"86%\">\n<p>9. The password should contain special characters and should contain combinations of letters, numbers and special characters<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"86%\">\n<p>10. The password is too short, should contain special characters and should contain combinations of letters, numbers and special characters<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<h2>DEPENDENCIES <a name=\"DEPENDENCIES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">No dependencies other than core.<\/p>\n<h2>AVAILABILITY <a name=\"AVAILABILITY\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">https:\/\/github.com\/Akron\/Data\u2212Password\u2212Meter<\/p>\n<h2>COPYRIGHT AND LICENSE <a name=\"COPYRIGHT AND LICENSE\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Copyright (C) 2006, Steve Moitozo, (C) 2013\u22122018, Nils Diewald <http:\/\/nils-diewald.de>.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Licensed under the <small>MIT<\/small> License<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  Data::Password::Meter \u2212 Check the strength of passwords <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[3245,3007],"class_list":["post-6882","post","type-post","status-publish","format-standard","hentry","category-sin-categoria","tag-datapasswordmeter","tag-man3"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/6882","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=6882"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/6882\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=6882"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=6882"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=6882"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}