/* -*-c-*-
*
- * $Id: sha512.c,v 1.1 2000/10/15 17:48:15 mdw Exp $
+ * $Id: sha512.c,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* Implementation of the SHA-512 hash function
*
* (c) 2000 Straylight/Edgeware
*/
-/*----- Licensing notice --------------------------------------------------*
+/*----- Licensing notice --------------------------------------------------*
*
* This file is part of Catacomb.
*
* it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
- *
+ *
* Catacomb is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
- *
+ *
* You should have received a copy of the GNU Library General Public
* License along with Catacomb; if not, write to the Free
* Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
* MA 02111-1307, USA.
*/
-/*----- Revision history --------------------------------------------------*
- *
- * $Log: sha512.c,v $
- * Revision 1.1 2000/10/15 17:48:15 mdw
- * New SHA variants with longer outputs.
- *
- */
-
/*----- Header files ------------------------------------------------------*/
#include <mLib/bits.h>
{
octet *p = hash;
final(ctx);
- STORE64_(p + 0, ctx->a);
- STORE64_(p + 8, ctx->b);
+ STORE64_(p + 0, ctx->a);
+ STORE64_(p + 8, ctx->b);
STORE64_(p + 16, ctx->c);
STORE64_(p + 24, ctx->d);
STORE64_(p + 32, ctx->e);
{
octet *p = hash;
final(ctx);
- STORE64_(p + 0, ctx->a);
- STORE64_(p + 8, ctx->b);
+ STORE64_(p + 0, ctx->a);
+ STORE64_(p + 8, ctx->b);
STORE64_(p + 16, ctx->c);
STORE64_(p + 24, ctx->d);
STORE64_(p + 32, ctx->e);
unsigned long sha512_state(sha512_ctx *ctx, void *state)
{
octet *p = state;
- STORE64_(p + 0, ctx->a);
- STORE64_(p + 8, ctx->b);
+ STORE64_(p + 0, ctx->a);
+ STORE64_(p + 8, ctx->b);
STORE64_(p + 16, ctx->c);
STORE64_(p + 24, ctx->d);
STORE64_(p + 32, ctx->e);