예제 #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);
        }
예제 #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);
        }