public inbox for cygwin-apps-cvs@sourceware.org help / color / mirror / Atom feed
From: corinna@sourceware.org To: cygwin-apps-cvs@sourceware.org Subject: [crypt - a library implementing the hopelessly outdated 56 bit DES encryption] branch master, updated. 6141192b5aeadc20347f69cf1cee423f96c1006c Date: Thu, 09 Jun 2016 15:01:00 -0000 [thread overview] Message-ID: <20160609150103.41995.qmail@sourceware.org> (raw) [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain, Size: 4127 bytes --] https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/crypt.git;h=6141192b5aeadc20347f69cf1cee423f96c1006c commit 6141192b5aeadc20347f69cf1cee423f96c1006c Author: Corinna Vinschen <corinna@vinschen.de> Date: Thu Jun 9 16:59:30 2016 +0200 Fix README version and remove really old Windows 9x description Signed-off-by: Corinna Vinschen <corinna@vinschen.de> https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/crypt.git;h=534b17b87bb0318bc339125369039f8ef5eddae5 commit 534b17b87bb0318bc339125369039f8ef5eddae5 Author: Corinna Vinschen <corinna@vinschen.de> Date: Thu Jun 9 16:57:26 2016 +0200 Fix setkey prototype and definition Also fix "array subscript has type âcharâ" compiler warnings. Signed-off-by: Corinna Vinschen <corinna@vinschen.de> https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/crypt.git;h=4f8d340c1fc457b81507ad366f9abcc87b9c552e commit 4f8d340c1fc457b81507ad366f9abcc87b9c552e Author: Corinna Vinschen <corinna@vinschen.de> Date: Fri Mar 18 11:04:31 2016 +0100 Add auto-image-base option when building DLL Signed-off-by: Corinna Vinschen <corinna@vinschen.de> Diff: --- Makefile | 6 ++++-- crypt.README | 9 +-------- encrypt.c | 8 ++++---- encrypt.h | 2 +- 4 files changed, 10 insertions(+), 15 deletions(-) diff --git a/Makefile b/Makefile index e1bb705..846ca2c 100644 --- a/Makefile +++ b/Makefile @@ -27,8 +27,10 @@ $(STATICLIB): encrypt.o $(AR) rv $@ encrypt.o $(SHAREDLIB): encrypt.o - $(CC) -shared -Wl,--gc-sections -Wl,--out-implib=$(IMPORTLIB) crypt.def \ - $^ -o $@ + $(CC) -shared -Wl,--enable-auto-image-base \ + -Wl,--gc-sections -Wl,--out-implib=$(IMPORTLIB) \ + crypt.def \ + $^ -o $@ encrypt.o: encrypt.h diff --git a/crypt.README b/crypt.README index d7ee763..e20aff8 100644 --- a/crypt.README +++ b/crypt.README @@ -1,4 +1,4 @@ -This is the DES-crypt package Version 1.1 +This is the DES-crypt package Version 1.4 It provides a static library libcrypt.a as well as a shared library cygcrypt-0.dll together with a link lib libcrypt.dll.a, which export @@ -16,13 +16,6 @@ which is a tool to generate encrypted passwords from cleartext passwords. The encrypted password is written to stdout with a trailing line feed. -Use this tool to create password entries in /etc/passwd on 9x systems. -On 9x machines, this DES password authentication is used in applications -like e. g. login(1) or ftpd(8). Note that the password entry in -/etc/passwd is not used on NT systems. Instead, users are authenticated -using the NT password itself. So crypt.exe is mainly a convenience for -9x users. - Note that this tool does *not* provide the crypt(1) functionality known from e. g. SUN Solaris(tm) machines. The encryption used here is incompatible with the encryption used there. diff --git a/encrypt.c b/encrypt.c index 7195912..35a3238 100644 --- a/encrypt.c +++ b/encrypt.c @@ -161,7 +161,7 @@ perm (a, e, pc, n) int n; { for (; n--; pc++, a++) - *a = e[*pc]; + *a = e[*(unsigned char *) pc]; } static void @@ -178,7 +178,7 @@ crypt_main (nachr_l, nachr_r, schl) for (i = 0; i < 8; i++) { for (j = 0, sbval = 0; j < 6; j++) - sbval = (sbval << 1) | (nachr_r[*e++] ^ *schl++); + sbval = (sbval << 1) | (nachr_r[*(unsigned char *) e++] ^ *schl++); sbval = S_BOX[i][sbval]; for (tp += 4, j = 4; j--; sbval >>= 1) *--tp = sbval & 1; @@ -187,7 +187,7 @@ crypt_main (nachr_l, nachr_r, schl) e = PERM; for (i = 0; i < BS2; i++) - *nachr_l++ ^= tmp[*e++]; + *nachr_l++ ^= tmp[*(unsigned char *) e++]; } void @@ -217,7 +217,7 @@ encrypt (char *nachr, int decr) } void -setkey (char *schl) +setkey (const char *schl) { char tmp1[IS]; register unsigned int ls = 0x7efc; diff --git a/encrypt.h b/encrypt.h index 00ec10d..df053e7 100644 --- a/encrypt.h +++ b/encrypt.h @@ -25,7 +25,7 @@ extern "C" #endif void encrypt (char *block, int edflag); -void setkey (char *key); +void setkey (const char *key); char *crypt (const char *key, const char *salt); #ifdef __cplusplus
reply other threads:[~2016-06-09 15:01 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20160609150103.41995.qmail@sourceware.org \ --to=corinna@sourceware.org \ --cc=cygwin-apps-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).