[horde] Patch - New "Encryption" type added to framework
Auth.php for MS Active Directory unicodePwd encoding.
Jan Schneider
jan at horde.org
Mon May 3 14:49:12 PDT 2004
Zitat von LRM <lrm at ionline.com.br>:
> Jan,
>
> Trying to follow your suggestion of using String::convertCharset, the
> following issue arises:
>
> http://support.microsoft.com/default.aspx?scid=kb;en-us;263991
>
> According to MS, the encoded "newPassword" (with double quotes, another
> requirement for the unicodePwd vaule) is equal to the following encoded
> string:
>
> IgBuAGUAdwBQAGEAcwBzAHcAbwByAGQAIgA=
>
> So,
>
> $plaintext = 'newPassword';
>
> $encrypted = '"' . $plaintext . '"';
> $encrypted = mb_convert_encoding($encrypted, "UTF-16LE", "ISO-8859-1");
> $encrypted = base64_encode($encrypted);
>
> Result encoded: IgBuAGUAdwBQAGEAcwBzAHcAbwByAGQAIgA=
>
> Using mb_convert_encoding with those parameters returns an identical encoded
> string as MS example.
>
> But,
>
> $encrypted = '"' . $plaintext . '"';
> $encrypted = String::convertCharset($encrypted, "ISO-8859-1", "UTF-16LE");
> $encrypted = base64_encode($encrypted);
>
> Result Encoded: IgBuAGUAdwBQAGEAcwBzAHcAbwByAGQAIgB4
>
> Using your suggested String::convertCharset returns a different encoded
> string.
>
> Any suggestions/toughts?
More interesting is the difference between those values *before* you
base64_encode it.
Jan.
--
http://www.horde.org - The Horde Project
http://www.ammma.de - Neue Wege des Lernens
http://www.tip4all.de - Deine private Tippgemeinschaft
More information about the horde
mailing list