Master client for mail encryption/decryption and signature management.

Namespace: NHINDirect.Agent
Assembly: nhinAgent (in nhinAgent.dll) Version: 1.0.0.0 (1.0.0.0)

Syntax

C#
public class NHINDAgent
Visual Basic
Public Class NHINDAgent
Visual C++
public ref class NHINDAgent

Examples

This example demonstrates a typical use of the Agent, using local certificate management for private certificates, DNS management for remote certificates, and a local store of trust anchors.
CopyC#
CertificateIndex localcerts = SystemX509Store.OpenPrivate().Index(); 
var dnsresolver = new DnsCertResolver("8.8.8.8"); 
var trustanchors = TrustAnchorResolver.CreateDefault(); 
var ougoingmsg = File.ReadAllText("outgoing.eml"); // plaintext RFC 5322 email message 
var incomingmsg = File.ReadAllText("incoming.eml"); // signed and encrypted S/MIME message 
var agent = NHINDAgent("hie.example.com", localcerts, dnsresolver, trustanchors); 

IncomingMessage incoming = agent.ProcessIncoming(incomingmsg); 
if (incoming.HasRejectedRecipients) 
{ 
    foreach(recipient in incoming.RejectedRecipients) 
    { 
        Console.WriteLine("Rejected {0}", recipient.Address); 
    } 
} 
OutgoingMessage outgoing = agent.ProcessOutgoing(outgoingmsg); 
if (outgoing.HasRejectedRecipients) 
{ 
    foreach(recipient in outgoing.RejectedRecipients) 
    { 
        Console.WriteLine("Rejected {0}", recipient.Address); 
    } 
}

Inheritance Hierarchy

System..::..Object
  NHINDirect.Agent..::..NHINDAgent

See Also