encrypt passwords from the command line or
prints the encrypted form of
to the standard output. This is mostly
useful for encrypting passwords from within scripts.
When invoked as makekey
, 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.
The options are as follows:
- Encrypt the string using Blowfish hashing with the
- Use the cipher type specified in the given user login
for more information.
- Run in makekey compatible
- Encrypt the string using MD5.
- Prompt for a single string with echo turned off.
- Encrypt the string using DES, with the specified
If no string
reads one string per line from standard
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
will be used.
For MD5 and Blowfish, a new random salt is automatically generated for each
Specifying the string
on the command line
should be discouraged; using the standard input is more secure.
first appeared in OpenBSD
command appeared in
Version 7 AT&T UNIX