- Added const-correctness to main codebase
diff --git a/include/polarssl/sha1.h b/include/polarssl/sha1.h
index 01e522d..ec08450 100644
--- a/include/polarssl/sha1.h
+++ b/include/polarssl/sha1.h
@@ -55,7 +55,7 @@
* \param input buffer holding the data
* \param ilen length of the input data
*/
-void sha1_update( sha1_context *ctx, unsigned char *input, int ilen );
+void sha1_update( sha1_context *ctx, const unsigned char *input, int ilen );
/**
* \brief SHA-1 final digest
@@ -72,7 +72,7 @@
* \param ilen length of the input data
* \param output SHA-1 checksum result
*/
-void sha1( unsigned char *input, int ilen, unsigned char output[20] );
+void sha1( const unsigned char *input, int ilen, unsigned char output[20] );
/**
* \brief Output = SHA-1( file contents )
@@ -83,7 +83,7 @@
* \return 0 if successful, 1 if fopen failed,
* or 2 if fread failed
*/
-int sha1_file( char *path, unsigned char output[20] );
+int sha1_file( const char *path, unsigned char output[20] );
/**
* \brief SHA-1 HMAC context setup
@@ -92,7 +92,7 @@
* \param key HMAC secret key
* \param keylen length of the HMAC key
*/
-void sha1_hmac_starts( sha1_context *ctx, unsigned char *key, int keylen );
+void sha1_hmac_starts( sha1_context *ctx, const unsigned char *key, int keylen );
/**
* \brief SHA-1 HMAC process buffer
@@ -101,7 +101,7 @@
* \param input buffer holding the data
* \param ilen length of the input data
*/
-void sha1_hmac_update( sha1_context *ctx, unsigned char *input, int ilen );
+void sha1_hmac_update( sha1_context *ctx, const unsigned char *input, int ilen );
/**
* \brief SHA-1 HMAC final digest
@@ -120,8 +120,8 @@
* \param ilen length of the input data
* \param output HMAC-SHA-1 result
*/
-void sha1_hmac( unsigned char *key, int keylen,
- unsigned char *input, int ilen,
+void sha1_hmac( const unsigned char *key, int keylen,
+ const unsigned char *input, int ilen,
unsigned char output[20] );
/**