(ARCFOUR_string_to_key): change order of bytes within unicode

characters.  this should probably be done in some arbitrarly complex
way to do it properly and you would have to know what character
encoding was used for the password and salt string.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7426 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1999-11-23 09:01:15 +00:00
parent 2c9d4a2b79
commit 3eeca33e57

View File

@@ -423,12 +423,12 @@ ARCFOUR_string_to_key(krb5_context context,
if (len != 0 && s == NULL) if (len != 0 && s == NULL)
return ENOMEM; return ENOMEM;
for (p = s, i = 0; i < password.length; ++i) { for (p = s, i = 0; i < password.length; ++i) {
*p++ = 0;
*p++ = ((char *)password.data)[i]; *p++ = ((char *)password.data)[i];
*p++ = 0;
} }
for (i = 0; i < salt.length; ++i) { for (i = 0; i < salt.length; ++i) {
*p++ = 0;
*p++ = ((char *)salt.data)[i]; *p++ = ((char *)salt.data)[i];
*p++ = 0;
} }
md4_init(&m); md4_init(&m);
md4_update(&m, s, len); md4_update(&m, s, len);