Ejemplo n.º 1
0
        /// <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);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
 public MacSecureMimeContext()
 {
     keychain = SecKeychain.Default;
 }