Set output length to 0 at start of function

This behaviour was present previously, and is depended on by the
test suites.

Signed-off-by: Steven Cooreman <steven.cooreman@silabs.com>
diff --git a/library/psa_crypto.c b/library/psa_crypto.c
index fce7211..a39c535 100644
--- a/library/psa_crypto.c
+++ b/library/psa_crypto.c
@@ -2244,6 +2244,7 @@
                               size_t hash_size,
                               size_t *hash_length )
 {
+    *hash_length = 0;
     if( operation->id == 0 )
         return( PSA_ERROR_BAD_STATE );
 
@@ -2277,6 +2278,7 @@
                                uint8_t *hash, size_t hash_size,
                                size_t *hash_length )
 {
+    *hash_length = 0;
     if( !PSA_ALG_IS_HASH( alg ) )
         return( PSA_ERROR_INVALID_ARGUMENT );