private CanonicalizeBody ( [ body, DkimCanonicalizationAlgorithm type ) : string | ||
body | [ | |
type | DkimCanonicalizationAlgorithm | |
return | string |
public string SignBody(string body) { Trace.WriteLine("DKIM body:"); Trace.WriteLine(body); var cb = DkimCanonicalizer.CanonicalizeBody(body, this.BodyCanonicalization); Trace.WriteLine("DKIM canonicalized body:"); Trace.WriteLine(cb); //if (this.Debug != null) //{ // this.Debug.WriteContent("DKIM body", body); // this.Debug.WriteContent("DKIM canonicalized body", cb); //} return(Convert.ToBase64String(_privateKeySigner.Hash(Encoding.GetBytes(cb), this.SigningAlgorithm))); }
public string SignBody(Email email) { var cb = DkimCanonicalizer.CanonicalizeBody(email.Body, BodyCanonicalization); return(Convert.ToBase64String(_privateKeySigner.Hash(email.Encoding.GetBytes(cb)))); }