Ejemplo n.º 1
0
        public void SaveKey(KeyDescription key)
        {
            var keyPath = this.KeyPath;

            var commentedKey = Regex.Replace(key.Key, @"(?=-----END)", String.Format("Ec2ManagerFingerprint:{0}\n", key.Fingerprint));

            Directory.CreateDirectory(Path.GetDirectoryName(keyPath));
            File.WriteAllText(keyPath, commentedKey);
        }
Ejemplo n.º 2
0
        public void SaveKey(KeyDescription key)
        {
            var keyPath = this.KeyPath;

            var commentedKey = Regex.Replace(key.Key, @"(?=-----END)", String.Format("Ec2ManagerFingerprint:{0}\n", key.Fingerprint));

            Directory.CreateDirectory(Path.GetDirectoryName(keyPath));
            File.WriteAllText(keyPath, commentedKey);
        }