Name

crypt — run Unix crypt() function on input data

DESCRIPTION

The filter calls Perl crypt function to encrypt input data.

EXAMPLES

Example: Filter example with random salt

The encrypted string should be different each time you run the code because the salt is random.
Encrypted string TEST with random salt is: 
[filter crypt]TEST[/filter].

Example: Filter example with hand-specified salt

The encrypted string should be the same each time you run the code because the salt does not change.
Encrypted string TEST with salt of AB is: 
[filter crypt.AB]TEST[/filter].

NOTES

AVAILABILITY

crypt is available in Interchange versions:

4.8.0-5.7.0 (git-head)

SOURCE

Interchange 5.7.0:

Source: code/Filter/crypt.filter
Lines: 18


# Copyright 2002-2007 Interchange Development Group and others
# Copyright 1996-2002 Red Hat, Inc.
# 
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.  See the LICENSE file for details.
# 
# $Id: crypt.filter,v 1.5 2007-03-30 23:40:44 pajamian Exp $

CodeDef crypt Filter
CodeDef crypt Description Crypt
CodeDef crypt Routine <<EOR
sub {
my ($val, $tag, $salt) = @_;
return crypt($val, $salt ? $salt : random_string(2));
}
EOR

AUTHORS

Interchange Development Group

SEE ALSO

Password(7ic)

DocBook! Interchange!