Example #1
0
        private static PrivateKeyAgentKey Add(List <PrivateKeyAgentKey> keys, KeyHostAlgorithm key, string comment)
        {
            var existingKey = GetKey(keys, key.Data);

            if (existingKey != null)
            {
                return(null);
            }

            var agentKey = new PrivateKeyAgentKey(key, comment);

            keys.Add(agentKey);
            return(agentKey);
        }
Example #2
0
        private static PrivateKeyAgentKey Add(List<PrivateKeyAgentKey> keys, KeyHostAlgorithm key, string comment)
        {
            var existingKey = GetKey(keys, key.Data);
            if (existingKey != null)
            {
                return null;
            }

            var agentKey = new PrivateKeyAgentKey(key, comment);
            keys.Add(agentKey);
            return agentKey;
        }