OpenAether
Cross Reference
j2/util/sha1.h
1 /* 2 * jabberd - Jabber Open Source Server 3 * Copyright (c) 2002-2003 Jeremie Miller, Thomas Muldowney, 4 * Ryan Eatmon, Robert Norris 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or 9 * (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA02111-1307USA 19 */ 20 21 /* sha1 functions */ 22 23 #ifndef INCL_SHA1_H 24 #define INCL_SHA1_H 25 26 typedef struct sha1_state_s { 27 unsigned long H[5]; 28 unsigned long W[80]; 29 int lenW; 30 unsigned long sizeHi,sizeLo; 31 } sha1_state_t; 32 33 void sha1_init(sha1_state_t *ctx); 34 void sha1_append(sha1_state_t *ctx, unsigned char *dataIn, int len); 35 void sha1_finish(sha1_state_t *ctx, unsigned char hashout[20]); 36 void sha1_hash(unsigned char *dataIn, int len, unsigned char hashout[20]); 37 38 #endif 39
This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.