From fcfc776bc6242fdefde0efd7b0c315fbeca08555 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 2 Jul 2011 12:30:03 -0400 Subject: Optimize long-word additions in SHA implementation --- crypt/sha256.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'crypt/sha256.h') diff --git a/crypt/sha256.h b/crypt/sha256.h index be8b077..fcf6148 100644 --- a/crypt/sha256.h +++ b/crypt/sha256.h @@ -1,6 +1,6 @@ /* Declaration of functions and data types used for SHA256 sum computing library functions. - Copyright (C) 2007 Free Software Foundation, Inc. + Copyright (C) 2007, 2011 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -31,7 +31,11 @@ struct sha256_ctx { uint32_t H[8]; - uint32_t total[2]; + union + { + uint64_t total64; + uint32_t total[2]; + }; uint32_t buflen; char buffer[128] __attribute__ ((__aligned__ (__alignof__ (uint32_t)))); }; -- cgit v1.1