* of the GNU Lesser General Public License.
*/
-#include "ucw/lib.h"
-#include "ucw/sha1.h"
-#include "ucw/unaligned.h"
+#include <ucw/lib.h>
+#include <ucw/sha1.h>
+#include <ucw/unaligned.h>
#include <string.h>
* of INBUF with length INLEN.
*/
void
-sha1_update(sha1_context *hd, const byte *inbuf, uns inlen)
+sha1_update(sha1_context *hd, const byte *inbuf, uint inlen)
{
if( hd->count == 64 ) /* flush the buffer */
{
* into outbuf which must have a size of 20 bytes.
*/
void
-sha1_hash_buffer(byte *outbuf, const byte *buffer, uns length)
+sha1_hash_buffer(byte *outbuf, const byte *buffer, uint length)
{
sha1_context hd;
sha1_init(&hd);
sha1_update(&hd, buffer, length);
- memcpy(outbuf, sha1_final(&hd), 20);
+ memcpy(outbuf, sha1_final(&hd), SHA1_SIZE);
}
#ifdef TEST
#include <stdio.h>
#include <unistd.h>
-#include "ucw/string.h"
+#include <ucw/string.h>
int main(void)
{