示例#1
0
        /// <summary>
        /// Imports keys from a given keyring to this keyring.
        /// </summary>
        /// <param name="importableKeyring">External keyring to import from</param>
        public void Import(Keyring importableKeyring)
        {
            if (ReadOnly)
            {
                throw new Exception("Keyring is read-only.");
            }
            foreach (var key in importableKeyring.Keys)
            {
                if (HasKey(key.Name))
                {
                    continue;
                }
                Add(key.Name, key.KeyData, key.Locked);
            }

            KeyringChanged?.Invoke();
        }
示例#2
0
 static Keyring()
 {
     GlobalKeyring = new Keyring();
 }