Added unit test cases. Renamed SecurityParameters.WrongDigest to IsInvalid.