Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!asuvax!mcdphx!caffeine.UUCP!charles From: charles@caffeine.UUCP (Charles Wolff) Newsgroups: comp.unix.questions Subject: Re: question on crypt(3x) routines Message-ID: <14595@mcdphx.phx.mcd.mot.com> Date: 19 Feb 91 16:26:02 GMT References: <14589@mcdphx.phx.mcd.mot.com> Sender: listen@mcdphx.phx.mcd.mot.com Reply-To: charles@caffeine.UUCP (Charles Wolff) Distribution: usa Organization: Motorola Microcomputer Division, Tempe, Az. Lines: 26 In article <14589@mcdphx.phx.mcd.mot.com> charles@phx.mcd.mot.com (Charles Wolff) writes: } }Can anyone either provide a response to the following or }point me toward a more appropriate newsgroup? } }I am looking at the "crypt(3X)" routines "setkey()" and "encrypt()", }in SysV Rel 3.2, and it's not clear to me how they're supposed to be }used. The manual page says: } I have already received a VERY helpful reply to this from Mike Oliver at Pyramid, so no need for more follow-ups. Briefly, the 64 character arrays passed to setkey() and encrypt() are "encoded" versions of the binary representations of the characters; for example, if the first character is 'A', then 'A' = 0x41 = 01000001 which leads to: setargs[0] = 0 setargs[1] = 1 setargs[2] = 0 and so on... based on the manual page, I hadn't figured this part of it out, and didn't understand what was supposed to go into the argument arrays to setkey() and encrypt(). Charles Wolff