aboutsummaryrefslogtreecommitdiff
path: root/lib/libcrypt/misc.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-161-2/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* General further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-201-1/+3
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 3-Clause license. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Notes: svn path=/head/; revision=326025
* Make libcrypt thread-safe. Add crypt_r(3).Ed Schouten2016-08-101-3/+1
| | | | | | | | | | | | | | | | | | | | | | glibc has a pretty nice function called crypt_r(3), which is nothing more than crypt(3), but thread-safe. It accomplishes this by introducing a 'struct crypt_data' structure that contains a buffer that is large enough to hold the resulting string. Let's go ahead and also add this function. It would be a shame if a useful function like this wouldn't be usable in multithreaded apps. Refactor crypt.c and all of the backends to no longer declare static arrays, but write their output in a provided buffer. There is no need to do any buffer length computation here, as we'll just need to ensure that 'struct crypt_data' is large enough, which it is. _PASSWORD_LEN is defined to 128 bytes, but in this case I'm picking 256, as this is going to be part of the actual ABI. Differential Revision: https://reviews.freebsd.org/D7306 Notes: svn path=/head/; revision=303920
* Add SHA256/512 ($5$ and $6$) to crypt(3). Used in linux-world, doesn'tMark Murray2011-04-091-0/+16
| | | | | | | | | | | hurt us. PR: misc/124164 Submitted by: KIMURA Yasuhiro < yasu utahime org > MFC after: 1 month Notes: svn path=/head/; revision=220497
* No functional change, but big code cleanup. WARNS, lint(1) and style(9).Mark Murray2002-03-061-5/+6
| | | | Notes: svn path=/head/; revision=91754
* Implement __FBSDID()Matthew Dillon2001-09-161-3/+3
| | | | Notes: svn path=/head/; revision=83551
* Big code cleanup. (Inspired by Brandon Gillespie). Also move asMark Murray1999-09-201-0/+46
much as possible away from secure/ to make extending easier. Notes: svn path=/head/; revision=51462