SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG

BotDetect - Real-Time Bot Detection API
 
 

MAN page from OpenSuSE perl-OpenXPKI-Core-0.9.1389-6.362.CS.i586.rpm

OpenXPKI::Template::Plugin::RandomPassword

Section: User Contributed Perl Documentation (3)
Updated: 2008-09-30
Index 

NAME

OpenXPKI::Template::Plugin::RandomPassword 

DESCRIPTION

This module implements a Template Toolkit plugin that generates randomlygenerated passwords in RFC2307 syntax. 

USAGE

In your template, use the following line at the beginning of the file toload the plugin:

  [% USE password = RandomPassword -%]

After doing so, you can use the class like this:

  ...    <digest>[% password.generate(scheme => 'ssha', callback => 'sub { print STDERR "*** NOTE: Password for user <John Doe> is: $_\n" }') %]</digest>  ...

This invocation will call the generate() method on the template's password instance variable. It passes the named parameters 'scheme' and'callback' to the function. The return value of the method is renderedinto the template output. 

Constructor

new

Called by the Template toolkit when instantiating the plugin. 

Methods

generate

Generates a random password and returns the encrypted value.

Named parameters:

scheme
Required. Specifies the password scheme to use. Supported values are 'plain', 'sha' (SHA1 hash), 'ssha' (seeded SHA1 hash), 'md5' (MD5 hash), 'ssha'(seeded SHA1 hash) and 'smd5' (seeded MD5 hash).

The recommended scheme is 'ssha'.

callback
Optional. String containing a valid Perl closure subroutine. The closure is called after generating the password with two parameters. The first parameter is the unencrypted password, the second one is the encrypted value.

$_ will contain the unencrypted password.


 

Index

NAME
DESCRIPTION
USAGE
Constructor
Methods

This document was created byman2html,using the manual pages.
 
ICM Bot detect detector