view src/sha.h @ 10372:618a330c0260

[gaim-migrate @ 11595] (17:31:55) SimGuy: LSchiere2: because the person that redid it didn't think to move the CPWs since they only have one field (17:32:05) SimGuy: the others are all multiple pieces of data (17:32:07) LSchiere2: its confusing and inconsistent now (17:48:00) SimGuy: LSchiere2: http://kevin.simguy.net:8888/patches/gaim-cpw-structify.diff (17:48:03) SimGuy: that should apply to both (17:48:16) SimGuy: the patch to util.c just fixes a spelling error in a comment I fixed like 6 weeks ago (17:48:59) SimGuy: er, both being HEAD and oldstatus committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Tue, 14 Dec 2004 22:50:54 +0000
parents db62420a53a2
children
line wrap: on
line source

/* 
 * The contents of this file are subject to the Mozilla Public
 * License Version 1.1 (the "License"); you may not use this file
 * except in compliance with the License. You may obtain a copy of
 * the License at http://www.mozilla.org/MPL/
 * 
 * Software distributed under the License is distributed on an "AS
 * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
 * implied. See the License for the specific language governing
 * rights and limitations under the License.
 * 
 * The Original Code is SHA 180-1 Reference Implementation (Compact version)
 * 
 * The Initial Developer of the Original Code is Paul Kocher of
 * Cryptography Research.  Portions created by Paul Kocher are 
 * Copyright (C) 1995-9 by Cryptography Research, Inc.  All
 * Rights Reserved.
 * 
 * Contributor(s):
 *
 */
#ifndef _GAIM_SHA_H_
#define _GAIM_SHA_H_

#include <glib.h>

typedef struct {
	guint32 H[5];
 	guint32 W[80];
	int lenW;
	guint32 sizeHi;
	guint32 sizeLo;
} SHA_CTX;

int strprintsha(char *dest, int *hashval);
void shaInit(SHA_CTX *ctx);
void shaUpdate(SHA_CTX *ctx, unsigned char *dataIn, int len);
void shaFinal(SHA_CTX *ctx, unsigned char hashout[20]);
void shaBlock(unsigned char *dataIn, int len, unsigned char hashout[20]);

#endif /* _GAIM_SHA_H_ */