diff -urN busybox/include/applets.h busybox.cryptpw/include/applets.h
--- busybox/include/applets.h	2004-08-26 17:01:34.000000000 -0600
+++ busybox.cryptpw/include/applets.h	2004-10-09 05:55:00.000000000 -0600
@@ -121,6 +121,9 @@
 #ifdef CONFIG_CRONTAB
 	APPLET(crontab, crontab_main, _BB_DIR_USR_BIN, _BB_SUID_ALWAYS)
 #endif
+#ifdef CONFIG_CRYPTPW
+	APPLET(cryptpw, cryptpw_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)
+#endif
 #ifdef CONFIG_CUT
 	APPLET(cut, cut_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)
 #endif
diff -urN busybox/include/usage.h busybox.cryptpw/include/usage.h
--- busybox/include/usage.h	2004-09-14 10:23:56.000000000 -0600
+++ busybox.cryptpw/include/usage.h	2004-10-09 05:55:00.000000000 -0600
@@ -246,6 +246,20 @@
 	"\t-d [user]    delete crontab for user\n" \
 	"\t-c dir       specify crontab directory"
 
+#ifdef CONFIG_FEATURE_SHA1_PASSWORDS
+  #define CRYPTPW_ALG_TYPES(a) a
+#else
+  #define CRYPTPW_ALG_TYPES(a)
+#endif
+#define cryptpw_trivial_usage \
+	"[OPTION] string"
+#define cryptpw_full_usage \
+	"Outputs a crypted version of the string.\n" \
+	"Options:\n" \
+	"\t-a\tDefine which algorithm shall be used for the password.\n" \
+	"\t\t\t(Choices: des, md5" \
+	CRYPTPW_ALG_TYPES(", sha1") \
+	". Default is md5.)"
 
 #define cut_trivial_usage \
 	"[OPTION]... [FILE]..."
diff -urN busybox/loginutils/Config.in busybox.cryptpw/loginutils/Config.in
--- busybox/loginutils/Config.in	2004-08-26 17:12:59.000000000 -0600
+++ busybox.cryptpw/loginutils/Config.in	2004-10-09 05:55:00.000000000 -0600
@@ -98,6 +98,12 @@
 	  Note that Busybox binary must be setuid root for this applet to
 	  work properly.
 
+config CONFIG_CRYPTPW
+	bool "cryptpw"
+	default n
+	help
+	  Utility for crypting a string.
+
 config CONFIG_SU
 	bool "su"
 	default n
diff -urN busybox/loginutils/Makefile.in busybox.cryptpw/loginutils/Makefile.in
--- busybox/loginutils/Makefile.in	2004-10-08 01:45:35.000000000 -0600
+++ busybox.cryptpw/loginutils/Makefile.in	2004-10-09 05:55:00.000000000 -0600
@@ -26,6 +26,7 @@
 LOGINUTILS-y:=
 LOGINUTILS-$(CONFIG_ADDGROUP)	+= addgroup.o
 LOGINUTILS-$(CONFIG_ADDUSER)	+= adduser.o
+LOGINUTILS-$(CONFIG_CRYPTPW)	+= cryptpw.o
 LOGINUTILS-$(CONFIG_GETTY)	+= getty.o
 LOGINUTILS-$(CONFIG_LOGIN)	+= login.o
 LOGINUTILS-$(CONFIG_PASSWD)	+= passwd.o
diff -urN busybox/loginutils/cryptpw.c busybox.cryptpw/loginutils/cryptpw.c
--- busybox/loginutils/cryptpw.c	1969-12-31 17:00:00.000000000 -0700
+++ busybox.cryptpw/loginutils/cryptpw.c	2004-10-09 05:55:00.000000000 -0600
@@ -0,0 +1,60 @@
+/* vi: set sw=4 ts=4: */
+
+/*
+ * cryptpw.c
+ * 
+ * Cooked from passwd.c by Thomas Lundquist <thomasez@zelow.no>
+ * 
+ */
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "busybox.h"
+
+
+extern int cryptpw_main(int argc, char **argv)
+{
+	char *clear;
+	char *crypted;
+
+	int flag;
+	int algo = 1;				/* -a - password algorithm */
+
+	while ((flag = getopt(argc, argv, "a:")) != EOF) {
+		switch (flag) {
+		case 'a':
+			algo = get_algo(optarg);
+			break;
+		default:
+			bb_show_usage();
+		}
+	}
+
+	if (optind < argc) {
+		clear = argv[optind];
+	} else {
+		bb_show_usage();
+	}
+
+	/*
+	
+	I want to use this but obscure.c does not export these. Yet.
+
+	*/
+	
+	if (palindrome(clear) || simple(clear)) {
+		fprintf(stderr, "Warning: weak password (continuing).\n");
+	}
+
+	if (algo == 1) {
+		crypted = pw_encrypt(clear, "$1$");
+	} else {
+		crypted = pw_encrypt(clear, crypt_make_salt());
+	}
+
+	printf("%s\n", crypted);
+
+	return (0);
+
+}

