public override void Context() { hash_of_script_text_with_cr = crypto_service.hash(script_text_with_cr); hash_of_script_text_with_lf = crypto_service.hash(script_text_with_lf); hash_of_script_text_with_crlf = crypto_service.hash(script_text_with_crlf); hash_of_another_script = crypto_service.hash(another_script); }
public void should_be_able_to_pass_text_and_get_back_a_base_64_hash_of_the_text() { string text_to_hash = "I want to see what the freak is going on here"; string expected_hash = "TMGPZJmBhSO5uYbf/TBqNA=="; Assert.AreEqual(expected_hash, md5_crypto.hash(text_to_hash)); }
private string create_hash(string sql_to_run, bool normalizeEndings) { var input = sql_to_run.Replace(@"'", @"''"); if (normalizeEndings) { input = input.Replace(WindowsLineEnding, UnixLineEnding).Replace(MacLineEnding, UnixLineEnding); } return(crypto_provider.hash(input)); }
private string create_hash(string sql_to_run) { return(crypto_provider.hash(sql_to_run.Replace(@"'", @"''"))); }