summaryrefslogtreecommitdiffstats
path: root/src/crypto/sha1.c
diff options
context:
space:
mode:
authorMichael Brown2012-03-21 15:13:15 +0100
committerMichael Brown2012-03-21 17:27:12 +0100
commitc76afb36054669759dd7a876e80b9779dbc79120 (patch)
treed906b9faed1adf020c8aa81d097cfca97832018c /src/crypto/sha1.c
parent[tls] Support sending a client certificate (diff)
downloadipxe-c76afb36054669759dd7a876e80b9779dbc79120.tar.gz
ipxe-c76afb36054669759dd7a876e80b9779dbc79120.tar.xz
ipxe-c76afb36054669759dd7a876e80b9779dbc79120.zip
[crypto] Use standard bit-rotation functions
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/crypto/sha1.c')
-rw-r--r--src/crypto/sha1.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/crypto/sha1.c b/src/crypto/sha1.c
index 834d9a21..fd271a63 100644
--- a/src/crypto/sha1.c
+++ b/src/crypto/sha1.c
@@ -28,20 +28,10 @@ FILE_LICENCE ( GPL2_OR_LATER );
#include <string.h>
#include <byteswap.h>
#include <assert.h>
+#include <ipxe/rotate.h>
#include <ipxe/crypto.h>
#include <ipxe/sha1.h>
-/**
- * Rotate dword left
- *
- * @v dword Dword
- * @v rotate Amount of rotation
- */
-static inline __attribute__ (( always_inline )) uint32_t
-rol32 ( uint32_t dword, unsigned int rotate ) {
- return ( ( dword << rotate ) | ( dword >> ( 32 - rotate ) ) );
-}
-
/** SHA-1 variables */
struct sha1_variables {
/* This layout matches that of struct sha1_digest_data,