summaryrefslogtreecommitdiffstats
path: root/src/lib/crypto/sha1/shs.c
Commit message (Collapse)AuthorAgeFilesLines
* Crypto modularity proj: Separate files under crypto directory based on their ↵Zhanna Tsitkov2009-08-031-381/+0
| | | | | | | | functionality. Move Kerberos specific files into krb subdir and MIT specific - into builtin subdir. Place all tests into crypto_tests subfolder. bigredbutton: whitespace git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22477 dc483132-0cff-0310-8789-dd5450dbe970
* Based on patch from lxs, with some changes:Ken Raeburn2008-08-271-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add several new gcc warning flags, used in the KfM build process. Put declarations before code. Fix a bunch of signed/unsigned type mixes, mostly by changing variable types to unsigned int. Fix constness in handling name of default ccache name. Make sure functions get declared with prototypes: krb5int_pthread_loaded krb5int_gmt_mktime krb5int_aes_encrypt krb5int_aes_decrypt gssint_mecherrmap_init gssint_mecherramp_get. Don't shadow global names: stat accept index open encrypt. Fix variable shadowing in LDAP ASN.1 support. Don't define unused krb5int_local_addresses. Don't export internal krb5_change_set_password. Fix error return indications from gssint_oid_to_mech. Create and use k5-gmt_mktime.h to provide one global declaration of krb5int_gmt_mktime, needed before we've generated krb5.h on some platforms. Not incorporated from initial patch: const changes in function signatures. ticket: 6096 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20697 dc483132-0cff-0310-8789-dd5450dbe970
* If CONFIG_SMALL_NO_CRYPTO is defined, turn off CONFIG_SMALL changes for ↵Ken Raeburn2008-08-121-1/+1
| | | | | | crypto code only git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20648 dc483132-0cff-0310-8789-dd5450dbe970
* Make more uses of load/store_32_be/le, which on x86 at least expandsKen Raeburn2008-08-021-12/+6
| | | | | | | to a single unaligned load/store instruction, instead of open-coding the shifts and masks. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20599 dc483132-0cff-0310-8789-dd5450dbe970
* shsUpdate should take an unsigned int for lengthEzra Peisach2006-04-201-1/+1
| | | | | | | | | | | | | | Update shsUpdate to take an unsigned int length instead of signed. The code already assumes that it is an integer >= 0. This change cleans up a number of signed/unsigned warnings. sha1/shs.h, shs.c, t_shs.c: change ints to unsigned int dk/dk_encrypt.c: static function trunc_hmac change a signed int to unsigned hash_provider/hash_sha1.c: Remove cast in argument to shsUpdate ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17945 dc483132-0cff-0310-8789-dd5450dbe970
* * shs.c: Include shs.h firstKen Raeburn2006-03-301-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17805 dc483132-0cff-0310-8789-dd5450dbe970
* * shs.c (SHSTransform) [CONFIG_SMALL]: Roll loops for each roundKen Raeburn2005-05-011-0/+28
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17209 dc483132-0cff-0310-8789-dd5450dbe970
* protoizeKen Raeburn2004-02-191-11/+4
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16102 dc483132-0cff-0310-8789-dd5450dbe970
* * shs.c, shs.h (shsUpdate): Declare second argument as constEzra Peisach2001-12-051-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14046 dc483132-0cff-0310-8789-dd5450dbe970
* * t_shs3.c: New test file from Marcus Watts.Ken Raeburn2001-07-161-10/+11
| | | | | | | | | | | | | | (longReverse): Resurrected function long since deleted from shs.c. * Makefile.in (check-unix, check-windows): Use t_shs3 test. (clean): Delete it. * shs.c (SHSTransform): Make input data pointer point to const. (SHSUpdate): Bugfixes suggested by Marcus Watts, to fix buffer overruns, bugs with small or odd block sizes. [mostly pr krb5-libs/626] git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13605 dc483132-0cff-0310-8789-dd5450dbe970
* * shs.h, shs.c, t_shs.c: Fix sha1 on Windows by renaming LONG toDanilo Almeida2001-07-061-34/+34
| | | | | | | | SHS_LONG to avoid problem with LONG being signed on Windows. Rename BYTE to SHS_BYTE to avoid any name colisions with Windows (where BYTE and LONG are types defined in the Platform SDK). git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13568 dc483132-0cff-0310-8789-dd5450dbe970
* Various changes to:Ken Raeburn2000-01-221-37/+1
| | | | | | | | | | | | | | * make most non-changing data const * silence "gcc -Wall -Werror" complaints on sparc-solaris2.6 ** delete unused functions and variables ** change if(a=b) ... to if((a=b)) or if((a=b)!=0) [yeah, kinda gratuitous] ** insert extra braces for 2-D arrays * some basic thread safety checks Not changing afsstring2key.c until I make sure I've got some tests for it. Currently, prng.c and afsstring2key.c, at least, still aren't thread-safe. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11959 dc483132-0cff-0310-8789-dd5450dbe970
* ressurect files missed by mergeTom Yu1998-11-021-0/+400
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11006 dc483132-0cff-0310-8789-dd5450dbe970