Author: RainWalker | Posted on: 6/16/2009 3:00:08 AM | Views : 363

[MS-WCCE] has a "Sanitized Common Name Algorithm" 
I implemented it as the following, to sanitize CNs(Common Names) for Active Directory Objects.
However, when testing my own code, I've always received different result from the real result I received from server.
Still, I can't see what's wrong with my code, I implemented it word by word according to the document description.
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace TestWCCE { class WCCEAlgorithm { private static string Hash(string strInput) { // Hash is initialized with 0 UInt16 hashSeed = 0; // For each excess character char[] charArray = strInput.ToCharArray(); foreach (char ch in charArray) { UInt16 value = 0x8007; UInt16 LowBit = ...

Go to the complete details ...