# plugin hashword_tester # v 0.01 2004-09-05 package hashword_tester; use CGI qw/:standard :netscape/; #require "$blosxom::plugin_dir/hashword"; # --- Configurable variables ----- # A password must be verified by hashword before you can # run this plugin. The value below is provided for easy # demonstration of hashword's operation; it's a hash of # the word 'test' (If this was a *real* plugin, you would # hash your own password in hashword, and then paste it in.) my $pw = 'iwowsclKiiBtA'; # <- for this simple demo, don't change this value # -------------------------------- # USAGE: # You'll need to call this plugin's output in a flavour file # in order to prove that the demo worked. Do so by adding this # line to a flavour file: (minus the leading '#') #

$hashword_tester::result

# (head or foot flavours are p'bly the easiest to use) # # To run the demo, you're going to add a 'password' parameter # to a normal blosxom URL; the plugin will respond with a short # string indicating whether you supplied the correct value # in the password parameter # For example, to produce a successful response, you would use this URL: # http://www.example.com/cgi-bin/blosxom.cgi?password=test # # To produce an unsuccessful response, you would use this URL: # http://www.example.com/cgi-bin/blosxom.cgi?password=taste # # You'll also get an unsuccessful response by entering NO password: # http://www.example.com/cgi-bin/blosxom.cgi $result = "You didn't enter a password!"; sub start { my $str = param('password'); if ($str) { if (hashword::verify_hash($str, $pw)) { $result = "You entered the right password"; return 1; } else { $result = "You entered the wrong password!"; } } return 0; } #$result = hashword::make_hash('test'); 1; __END__