[rng] Allow hash_df() to accept multiple underlying hash algorithms

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2012-03-05 16:13:07 +00:00
parent c8f52cccfb
commit fb6a33360f
5 changed files with 101 additions and 95 deletions

View File

@@ -454,7 +454,8 @@ int get_entropy_input_tmp ( unsigned int num_samples, uint8_t *tmp,
/* 5.4. tmp = tmp XOR
* df ( ( nonce || entropy_bitstring ), n )
*/
hash_df ( &data, sizeof ( data ), df_buf, sizeof ( df_buf ) );
hash_df ( &entropy_hash_df_algorithm, &data, sizeof ( data ),
df_buf, sizeof ( df_buf ) );
for ( i = 0 ; i < tmp_len ; i++ )
tmp[i] ^= df_buf[i];