version 1.3, 1996/08/08 04:37:01 |
version 1.4, 1996/08/26 08:41:25 |
|
|
.Os OpenBSD |
.Os OpenBSD |
.Sh NAME |
.Sh NAME |
.Nm encrypt |
.Nm encrypt |
.Nd encrypt passwords from the command line |
.Nd encrypt passwords from the command line or standard input |
.Sh SYNOPSIS |
.Sh SYNOPSIS |
.Nm encrypt |
.Nm encrypt |
|
.Op Fl k |
.Op Fl m |
.Op Fl m |
.Op Fl s Ar salt |
.Op Fl s Ar salt |
.Op Ar string |
.Op Ar string |
|
.Nm makekey |
.Sh DESCRIPTION |
.Sh DESCRIPTION |
.Nm encrypt |
.Nm encrypt |
prints the encrypted form of |
prints the encrypted form of |
.Ar string |
.Ar string |
to the standard output. This is mostly useful for encrypting passwords |
to the standard output. This is mostly useful for encrypting passwords |
from within scripts, such as |
from within scripts. |
.Xr adduser 8 . |
|
.Pp |
.Pp |
The following options are supported: |
The following options are supported: |
.Bl -tag -width X |
.Bl -tag -width XxXXXXX |
|
.It Fl k |
|
Run in |
|
.Nm 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. |
.It Fl m |
.It Fl m |
Encrypt the string using MD5. |
Encrypt the string using MD5. |
.It Fl s Ar salt |
.It Fl s Ar salt |
|
|
on the command line should be discouraged; using the |
on the command line should be discouraged; using the |
standard input is more secure. |
standard input is more secure. |
.Sh SEE ALSO |
.Sh SEE ALSO |
.Xr crypt 3 , |
.Xr crypt 3 |
.Xr adduser 8 |
|
.Sh HISTORY |
.Sh HISTORY |
.Nm encrypt |
.Nm encrypt |
first appeared in OpenBSD 1.2. |
first appeared in OpenBSD 1.2. |
|
.Pp |
|
A |
|
.Nm makekey |
|
command appeared in |
|
.At v7 . |