src/hash.c


Log

Author Commit Date CI Message
Ramsay Jones 1906f236 2009-02-26T20:37:20 Add built-in (Mozilla) SHA1 routines Paul agreed to the GCC-exception license by email: | | From: Paul Kocher <paul@cryptography.com> | Date: Sun, 15 Mar 2009 11:37:23 -0700 | Subject: Re: Adding Mozilla SHA1 implementation to libgit2 | | Yes - that's fine. | | At 01:56 AM 3/5/2009, Andreas Ericsson wrote: | > Hi Paul. We spoke earlier about this, if you remember? | > We'd like to add the GCC-exception to the GPL license | > for these files. Signed-off-by: Paul Kocher <paul@cryptography.com> Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Shawn O. Pearce 64a47c01 2008-12-30T23:21:36 Wrap malloc and friends and report out of memory as GIT_ENOMEM We now forbid direct use of malloc, strdup or calloc within the library and instead use wrapper functions git__malloc, etc. to invoke the underlying library malloc and set git_errno to a no memory error code if the allocation fails. In the future once we have pack objects in memory we are likely to enhance these routines with garbage collection logic to purge cached pack data when allocations fail. Because the size of the function will grow somewhat large, we don't want to mark them for inline as gcc tends to aggressively inline, creating larger than expected executables. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Ramsay Jones 007e0753 2008-12-27T18:58:25 Add some routines for SHA1 hash computation [sp: Changed signature for output to use git_oid, and added a test case to verify an allocated git_hash_ctx can be reinitialized and reused.] Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>