I have some data I wish to protect, so I am using ProtectedData
to encrypt it onto a file.
When I am attempting to read and decrypt the data I am getting the strangest exception:
CryptographicException - Unable to update the password. The value provided for the new password does not not meet the length, complexity, or history requirements of the domain.
This is where it is thrown:
byte[] decryptedData = ProtectedData.Unprotect(Encoding.UTF8.GetBytes(fileContent),
Encoding.UTF8.GetBytes(entropy),
DataProtectionScope.LocalMachine);
It also happens when using DataProtectionScope.CurrentUser
.
I haven't found any information about this exception online so I'm pretty much clueless.