From 4241900ec452a6956ece2aec668330e11a40a15d Mon Sep 17 00:00:00 2001 From: philsmd Date: Sat, 4 Jun 2022 11:17:16 +0200 Subject: [PATCH] radmin3: use make_utf16beN_S () and sha1_update_utf16beN () --- OpenCL/m29200_a3-pure.cl | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/OpenCL/m29200_a3-pure.cl b/OpenCL/m29200_a3-pure.cl index 05bc3eb63..66842a44a 100644 --- a/OpenCL/m29200_a3-pure.cl +++ b/OpenCL/m29200_a3-pure.cl @@ -110,13 +110,11 @@ KERNEL_FQ void m29200_mxx (KERN_ATTR_VECTOR_ESALT (radmin3_t)) // add password to the user name (and colon, included): - sha1_ctx_vector_t c0; + sha1_ctx_t c0 = ctx0; - sha1_init_vector_from_scalar (&c0, &ctx0); + sha1_update_utf16beN (&c0, w, pw_len); - sha1_update_vector_utf16beN (&c0, w, pw_len); - - sha1_final_vector (&c0); + sha1_final (&c0); // add first SHA1 result to main salt: @@ -351,13 +349,11 @@ KERNEL_FQ void m29200_sxx (KERN_ATTR_VECTOR_ESALT (radmin3_t)) // add password to the user name (and colon, included): - sha1_ctx_vector_t c0; - - sha1_init_vector_from_scalar (&c0, &ctx0); + sha1_ctx_t c0 = ctx0; - sha1_update_vector_utf16beN (&c0, w, pw_len); + sha1_update_utf16beN (&c0, w, pw_len); - sha1_final_vector (&c0); + sha1_final (&c0); // add first SHA1 result to main salt: