I also ran into this issue when trying to join a Windows 10 machine to the domain. The HostnameChanger will still change the PC name but only if you only try to change the PC name off domain.
The issue is with the System.Security.Cryptography.Rinjdael Class. I am assuming they changed the default padding method in windows 10 and this causes issues because windows can no longer decrypt the encrypted AD password due to non congruent padding.
*As a side note, passwords encrypted using FOGCrypt on Windows 10 will still work to join Windows 10 machines to domain, but then you will not be able to join any machine below Windows 10.
To solve the issue I went into the code and specified a padding method in both the HostnameChanger and FOGCrypt.
It is quite simple
private byte[] encrypt(byte[] clearData, byte[] Key, byte[] IV)
{
MemoryStream ms = new MemoryStream();
Rijndael alg = Rijndael.Create();
alg.Padding = PaddingMode.Zeros; //(Added for cross windows compatability)
alg.Key = Key;
alg.IV = IV;
CryptoStream cs = new CryptoStream(ms, alg.CreateEncryptor(), CryptoStreamMode.Write);
cs.Write(clearData, 0, clearData.Length);
cs.Close();
byte[] encryptedData = ms.ToArray();
return encryptedData;
}
private byte[] decrypt(byte[] cipherData, byte[] Key, byte[] IV)
{
MemoryStream ms = new MemoryStream();
Rijndael alg = Rijndael.Create();
alg.Padding = PaddingMode.Zeros; //(Added for cross windows compatability)
alg.Key = Key;
alg.IV = IV;
CryptoStream cs = new CryptoStream(ms, alg.CreateDecryptor(), CryptoStreamMode.Write);
cs.Write(cipherData, 0, cipherData.Length);
cs.Close();
byte[] decryptedData = ms.ToArray();
return decryptedData;
}
Do the same in FOGCrypt, re-encrypt your password, and presto. Windows 10, 8, 8.1, 7, etc, all join domains properly.
I hope this helps people.
Lonnie