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:
7DxXgiz6vGI2w.
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.
crypt is available in Interchange versions:
4.6.0, 4.6.0, 4.8.0, 5.0.0, 5.2.0, 5.4.0, 5.6.0, 5.8.0, 5.9.0 (git-head)
Interchange 5.9.0:
Source: code/UI_Tag/crypt.coretag
Lines: 19
# Copyright 2003-2007 Interchange Development Group and others # # 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.coretag,v 1.6 2007-03-30 23:40:54 pajamian Exp $ UserTag crypt Order value salt UserTag crypt attrAlias password value UserTag crypt attrAlias crypted salt UserTag crypt Version $Revision: 1.6 $ UserTag crypt Routine <<EOR sub { my ($string, $salt) = @_; return crypt($string, $salt ? $salt : Vend::Util::random_string(2)) } EOR