whirlpool/whirlpool_init.c

Go to the documentation of this file.
00001 // Copyright (C) 2006-2007 Benedikt Böhm <hollow@gentoo.org>
00002 //
00003 // The Whirlpool algorithm was developed by
00004 //                Paulo S. L. M. Barreto <pbarreto@scopus.com.br> and
00005 //                Vincent Rijmen <vincent.rijmen@cryptomathic.com>
00006 //
00007 // This program is free software; you can redistribute it and/or
00008 // modify it under the terms of the GNU General Public License
00009 // as published by the Free Software Foundation; either version 2
00010 // of the License, or (at your option) any later version.
00011 //
00012 // This program is distributed in the hope that it will be useful,
00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015 // GNU General Public License for more details.
00016 //
00017 // You should have received a copy of the GNU General Public License
00018 // along with this program; if not, write to the Free Software
00019 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
00020 
00021 #include "mem.h"
00022 #include "whirlpool.h"
00023 
00024 void whirlpool_init(whirlpool_t * const context)
00025 {
00026         int i;
00027 
00028         mem_set(context->len, 0, LENGTHBYTES);
00029 
00030         context->bits = context->pos = 0;
00031         context->buf[0]  = 0;
00032 
00033         for (i = 0; i < 8; i++)
00034                 context->hash[i] = 0L;
00035 }

Generated on Tue Jun 19 20:38:27 2007 for lucid by  doxygen 1.5.2