Simon Josefsson <[EMAIL PROTECTED]> writes: > Oh. There is a POSIX "setkey" function. It is not thread safe, so I > can't use it. But GNU has setkey_r and encrypt_r in crypt.h. I think > gnulib should duplicate that API instead.
I changed my mind -- that API uses as input 64 byte long strings, where each char is either "0" or "1". I.e., it uses an ASCII-encoding of each block. That is definitely not something we should promote. However, I discovered that glibc has another DES implementation: ecb_crypt and cbc_crypt in rpc/des_crypt.h. The interface seem somewhat inefficient, because you can't do a "setkey" operation and then use the scheduled key for several operations. It has a strange license: * Sun RPC is a product of Sun Microsystems, Inc. and is provided for * unrestricted use provided that this legend is included on all tape * media and as a part of the software program in whole or part. Users * may copy or modify Sun RPC without charge, but are not authorized * to license or distribute it to anyone else except as part of a product or * program developed by the user. However, detecting and replacing that code seem like real work, and I'm not sure we want to promote an RPC API either. Unless someone feel strongly (and, preferably, even want to do the leg work...) I'll simply fix the namespace of the current DES module. _______________________________________________ bug-gnulib mailing list bug-gnulib@gnu.org http://lists.gnu.org/mailman/listinfo/bug-gnulib