crypt — run Unix crypt() function on input data
Example: Filter example with random salt
Encrypted string TEST
with random salt is:
[filter crypt]TEST[/filter].
Example in action:Encrypted string TEST
with random salt is:
Frvz7UTKQWzws.
Example: Filter example with hand-specified salt
Encrypted stringExample in action:TEST
with salt ofAB
is: [filter crypt.AB]TEST[/filter].
Encrypted string TEST
with salt of AB
is:
ABqvR6zZkzeuA.
Interchange 5.9.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