Change HMAC-SHA1 implementation to the one taken from gnulib, which

contains a more clear copyright notice.



git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17054 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Maurus Cuelenaere 2008-04-09 16:29:05 +00:00
parent ab796a2e49
commit 49236bb62b
3 changed files with 605 additions and 496 deletions

View file

@ -68,8 +68,8 @@ static int make_ciff_file(unsigned char *inbuf, int length,
memcpy(&outbuf[0x98+length], "LLUN", 4);
int2le(20, &outbuf[0x98+length+4]);
/* Do checksum */
hmac_sha((unsigned char *)devices[device].null, strlen(devices[device].null),
outbuf, 0x98+length, key, 20);
hmac_sha1((unsigned char *)devices[device].null, strlen(devices[device].null),
outbuf, 0x98+length, key);
memcpy(&outbuf[0x98+length+8], key, 20);
return length+0x90+0x1C+8;
}