PDKIM: Upgrade PolarSSL files to upstream version 0.12.1. Thanks to Andreas Metzler...
[exim.git] / src / src / pdkim / sha1.c
index f118f4eb18db4e3400a1521856695428afb4eabc..8cb9d00d75ba560905ec934969afb071833b286e 100644 (file)
@@ -1,9 +1,10 @@
 /*
  *  FIPS-180-1 compliant SHA-1 implementation
  *
- *  Based on XySSL: Copyright (C) 2006-2008  Christophe Devine
+ *  Copyright (C) 2006-2009, Paul Bakker <polarssl_maintainer at polarssl.org>
+ *  All rights reserved.
  *
- *  Copyright (C) 2009  Paul Bakker <polarssl_maintainer at polarssl dot org>
+ *  Joined copyright on original XySSL code with: Christophe Devine
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -25,7 +26,7 @@
  *  http://www.itl.nist.gov/fipspubs/fip180-1.htm
  */
 
-/* $Cambridge: exim/src/src/pdkim/sha1.c,v 1.2 2009/06/10 07:34:05 tom Exp $ */
+/* $Cambridge: exim/src/src/pdkim/sha1.c,v 1.3 2009/12/07 13:05:07 tom Exp $ */
 
 #include "sha1.h"
 
@@ -310,7 +311,7 @@ void sha1_finish( sha1_context *ctx, unsigned char output[20] )
 /*
  * output = SHA-1( input buffer )
  */
-void sha1_oneshot( unsigned char *input, int ilen, unsigned char output[20] )
+void sha1( unsigned char *input, int ilen, unsigned char output[20] )
 {
     sha1_context ctx;
 
@@ -363,7 +364,7 @@ void sha1_hmac_starts( sha1_context *ctx, unsigned char *key, int keylen )
 
     if( keylen > 64 )
     {
-        sha1_oneshot( key, keylen, sum );
+        sha1( key, keylen, sum );
         keylen = 20;
         key = sum;
     }