summaryrefslogtreecommitdiff
path: root/lib/libcrypt/crypt.c
diff options
context:
space:
mode:
authorthorpej <thorpej@NetBSD.org>2000-06-16 16:27:32 +0000
committerthorpej <thorpej@NetBSD.org>2000-06-16 16:27:32 +0000
commit9323d932342fac2ebc7dc419bcfc3bfa604b9c48 (patch)
tree78fba6a088259e2707e5f88834d7cb4cbca5af22 /lib/libcrypt/crypt.c
parenta7a6978d06de8af8cb317d5267e44e4f4e942689 (diff)
Enable decryption in crypt(), from cryptosrc-intl, and lift the updated
manual page (which describes decryption) from cryptosrc-us.
Diffstat (limited to 'lib/libcrypt/crypt.c')
-rw-r--r--lib/libcrypt/crypt.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/libcrypt/crypt.c b/lib/libcrypt/crypt.c
index 0e00967f2e7..d50169e9e38 100644
--- a/lib/libcrypt/crypt.c
+++ b/lib/libcrypt/crypt.c
@@ -1,4 +1,4 @@
-/* $NetBSD: crypt.c,v 1.14 2000/03/13 22:59:22 soren Exp $ */
+/* $NetBSD: crypt.c,v 1.15 2000/06/16 16:27:32 thorpej Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)crypt.c 8.1.1.1 (Berkeley) 8/18/93";
#else
-__RCSID("$NetBSD: crypt.c,v 1.14 2000/03/13 22:59:22 soren Exp $");
+__RCSID("$NetBSD: crypt.c,v 1.15 2000/06/16 16:27:32 thorpej Exp $");
#endif
#endif /* not lint */
@@ -666,7 +666,9 @@ des_cipher(in, out, salt, num_iter)
}
else
{ /* decryption */
- return (1); /* always fail */
+ num_iter = -num_iter;
+ kp = &KS[KS_SIZE-1];
+ ks_inc = -(long)sizeof(*kp);
}
while (--num_iter >= 0) {