summaryrefslogtreecommitdiff
path: root/src/math/copysignf.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2012-06-29 00:56:37 -0400
committerRich Felker <dalias@aerifal.cx>2012-06-29 00:56:37 -0400
commitcdf51506ce895286011ff0abe5434557845108ee (patch)
tree6060653c351115b09a1b363fcd56014cd0209d61 /src/math/copysignf.c
parent9abab94b211c5103e3f6baf97ad76523618a553c (diff)
downloadmusl-cdf51506ce895286011ff0abe5434557845108ee.tar.gz
musl-cdf51506ce895286011ff0abe5434557845108ee.tar.bz2
musl-cdf51506ce895286011ff0abe5434557845108ee.tar.xz
musl-cdf51506ce895286011ff0abe5434557845108ee.zip
replace old and ugly crypt implementation
the new version is largely the work of Solar Designer, with minor changes for integration with musl. compared to the old code, text size is reduced by about 7k, stack space usage by about 70k, and performance is greatly improved by avoiding expensive calculation of constant tables on each run. this version also adds support for extended des-based password hashes, which allow for unlimited key (password) length and configurable iteration counts. i've also published the interface for crypt_r in a new crypt.h header. especially since this is not a standard interface, i did not feel compelled to match the glibc abi for the crypt_data structure. the glibc structure is way too big to allocate on the stack; in fact it's so big that the first usage may cause the main thread to exceed its pre-committed stack size of 128k and thus could cause the program to crash even on systems with overcommit disabled. the only legitimate use of crypt_data for crypt_r is to store the hash string to return, so i've reserved 256 bytes, which should be more than sufficient (longest known password hashes are ~60 characters, and beyond that is possibly even exceeding some implementations' passwd file field size limit).
Diffstat (limited to 'src/math/copysignf.c')
0 files changed, 0 insertions, 0 deletions