=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/encrypt/encrypt.1,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- src/usr.bin/encrypt/encrypt.1 1996/08/08 04:37:01 1.3 +++ src/usr.bin/encrypt/encrypt.1 1996/08/26 08:41:25 1.4 @@ -1,4 +1,4 @@ -.\" $OpenBSD: encrypt.1,v 1.3 1996/08/08 04:37:01 downsj Exp $ +.\" $OpenBSD: encrypt.1,v 1.4 1996/08/26 08:41:25 downsj Exp $ .\" .\" Copyright (c) 1996, Jason Downs. All rights reserved. .\" @@ -28,22 +28,29 @@ .Os OpenBSD .Sh NAME .Nm encrypt -.Nd encrypt passwords from the command line +.Nd encrypt passwords from the command line or standard input .Sh SYNOPSIS .Nm encrypt +.Op Fl k .Op Fl m .Op Fl s Ar salt .Op Ar string +.Nm makekey .Sh DESCRIPTION .Nm encrypt prints the encrypted form of .Ar string to the standard output. This is mostly useful for encrypting passwords -from within scripts, such as -.Xr adduser 8 . +from within scripts. .Pp 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 Encrypt the string using MD5. .It Fl s Ar salt @@ -63,8 +70,12 @@ on the command line should be discouraged; using the standard input is more secure. .Sh SEE ALSO -.Xr crypt 3 , -.Xr adduser 8 +.Xr crypt 3 .Sh HISTORY .Nm encrypt first appeared in OpenBSD 1.2. +.Pp +A +.Nm makekey +command appeared in +.At v7 .