aboutsummaryrefslogtreecommitdiff
path: root/pbkdf2.c
diff options
context:
space:
mode:
Diffstat (limited to 'pbkdf2.c')
-rw-r--r--pbkdf2.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/pbkdf2.c b/pbkdf2.c
index f361328..c696f2f 100644
--- a/pbkdf2.c
+++ b/pbkdf2.c
@@ -105,6 +105,15 @@ hal_error_t hal_pbkdf2(const hal_core_t *core,
if ((uint64_t) derived_key_length > ((uint64_t) 0xFFFFFFFF) * descriptor->block_length)
return HAL_ERROR_UNSUPPORTED_KEY;
+#if 1
+ /* HACK - find the second sha256 core, to avoid interfering with rpc.
+ * If there isn't a second one, this will set core to NULL, and
+ * hal_hash_initialize will find the first one.
+ */
+ core = hal_core_find(descriptor->core_name, NULL);
+ core = hal_core_find(descriptor->core_name, core);
+#endif
+
memset(result, 0, sizeof(result));
memset(mac, 0, sizeof(mac));