MirOS Manual: encrypt(1), makekey(8)

ENCRYPT(1)                   BSD Reference Manual                   ENCRYPT(1)

NAME

     encrypt - encrypt passwords from the command line or standard input

SYNOPSIS

     encrypt -b rounds [-p | string]
     encrypt [-c class] [-p | string]
     encrypt -m [-p | string]
     encrypt -S salt [-p | string]
     encrypt -s salt [-p | string]
     encrypt -k
     makekey

DESCRIPTION

     encrypt prints the encrypted form of string to the standard output. This
     is mostly useful for encrypting passwords from within scripts.

     The options are as follows:

     -k         Run in makekey compatible mode; a single combined key and salt
                are read from standard input and the DES encrypted result is
                written to standard output without a terminating newline.

     -b rounds  Encrypt the string using Blowfish hashing with the specified
                rounds.

     -c class   Use the cipher type specified in the given user login class.
                See login.conf(5) for more information.

     -m         Encrypt the string using MD5.

     -p         Prompt for a single string with echo turned off.

     -S salt    Encrypt the string with the specified salt, using the algo-
                rithm specified by salt.

     -s salt    Encrypt the string using DES, with the specified salt.

     If no string is specified, encrypt reads one string per line from stan-
     dard input, encrypting each one with the chosen algorithm from above. In
     the case where no specific algorithm or specific user login class was
     given as a command line option, the algorithm specified in the default
     class in /etc/login.conf will be used.

     For MD5 and Blowfish as well as any algorithm determined from the login
     class, a new random salt is automatically generated for each password,
     except if the -S option is used.

     Specifying the string on the command line should be discouraged; using
     the standard input is more secure.

FILES

     /etc/login.conf

SEE ALSO

     crypt(3), login.conf(5)

HISTORY

     encrypt first appeared in OpenBSD 1.2.

     A makekey command appeared in Version 7 AT&T UNIX.

     The -S option first appeared in MirOS #11.

MirOS BSD #10-current         September 6, 2008                              1

Generated on 2014-07-04 21:17:45 by $MirOS: src/scripts/roff2htm,v 1.79 2014/02/10 00:36:11 tg Exp $

These manual pages and other documentation are copyrighted by their respective writers; their source is available at our CVSweb, AnonCVS, and other mirrors. The rest is Copyright © 2002‒2014 The MirOS Project, Germany.
This product includes material provided by Thorsten Glaser.

This manual page’s HTML representation is supposed to be valid XHTML/1.1; if not, please send a bug report – diffs preferred.