/// <summary> /// Releases all resources used by the <see cref="MimeKit.Cryptography.MacSecureMimeContext"/> object. /// </summary> /// <param name="disposing">If <c>true</c>, this method is being called by /// <see cref="MimeKit.Cryptography.CryptographyContext.Dispose"/>; /// otherwise it is being called by the finalizer.</param> protected override void Dispose(bool disposing) { if (disposing && keychain != SecKeychain.Default) { keychain.Dispose(); keychain = null; } base.Dispose(disposing); }
public MacSecureMimeContext(string path, string password) { if (path == null) { throw new ArgumentNullException("path"); } if (password == null) { throw new ArgumentNullException("password"); } keychain = SecKeychain.Create(path, password); }
public MacSecureMimeContext() { keychain = SecKeychain.Default; }