コード例 #1
0
        public string SignSignature([NotNull] Email email)
        {
            var text = DomainKeyCanonicalizer.Canonicalize(email, this.Canonicalization, _headersToSign);

            Trace.WriteLine("DomainKey canonicalized headers:");
            Trace.WriteLine(text);
            //if (this.Debug != null)
            //{
            //    this.Debug.WriteContent("DomainKey canonicalized headers", text);
            //}

            return(Convert.ToBase64String(_privateKeySigner.Sign(this.Encoding.GetBytes(text), SigningAlgorithm.RSASha1)));
        }
コード例 #2
0
        public string SignSignature(Email email, List <EmailHeader> headers)
        {
            var text = DomainKeyCanonicalizer.Canonicalize(email, this.Canonicalization, headers);

            return(Convert.ToBase64String(_privateKeySigner.Sign(email.Encoding.GetBytes(text))));
        }