The resource definition in tomcat\'s server.xml looks something like this...
We use C#'s SHA1CryptoServiceProvider
print(SHA1CryptoServiceProvider sHA1Hasher = new SHA1CryptoServiceProvider();
ASCIIEncoding enc = new ASCIIEncoding();
byte[] arrbytHashValue = sHA1Hasher.ComputeHash(enc.GetBytes(clearTextPW));
string HashData = System.BitConverter.ToString(arrbytHashValue);
HashData = HashData.Replace("-", "");
if (HashData == databaseHashedPassWO)
{
return true;
}
else
{
return false;
});
)