whirlpool/whirlpool_init.c

Go to the documentation of this file.
00001 // Copyright 2006 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 modify
00008 // it under the terms of the GNU General Public License as published by
00009 // the Free Software Foundation; either version 2 of the License, or
00010 // (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
00019 // Free Software Foundation, Inc.,
00020 // 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00021 
00022 #include "str.h"
00023 #include "whirlpool.h"
00024 
00025 void whirlpool_init(whirlpool_t * const context)
00026 {
00027         int i;
00028         
00029         str_zero(context->len, LENGTHBYTES);
00030         
00031         context->bits = context->pos = 0;
00032         context->buf[0]  = 0;
00033         
00034         for (i = 0; i < 8; i++)
00035                 context->hash[i] = 0L;
00036 }

Generated on Sun Dec 3 17:45:53 2006 for lucid by  doxygen 1.5.1