├── README.md ├── LICENSE └── Program.cs /README.md: -------------------------------------------------------------------------------- 1 | # Password Manager 2 | 3 | ## 📌 Опис 4 | Менеджер паролів з шифруванням AES 5 | 6 | ## 🚀 Використання 7 | 1. Відкрийте код у Visual Studio або VS Code. 8 | 2. Запустіть програму за допомогою `dotnet run`. 9 | 3. Використовуйте функціонал програми. 10 | 11 | ## 🔧 Додаткові можливості 12 | - Поліпшення UI/UX (наприклад, створення GUI на WPF або WinForms). 13 | - Додавання додаткових функцій та розширень. 14 | 15 | Ліцензія: MIT License 16 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2025 Pljacok 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Security.Cryptography; 3 | using System.Text; 4 | 5 | class PasswordManager 6 | { 7 | static void Main() 8 | { 9 | Console.WriteLine("🔐 Менеджер паролів"); 10 | Console.Write("Введіть пароль для шифрування: "); 11 | string password = Console.ReadLine(); 12 | 13 | string encrypted = Encrypt(password); 14 | Console.WriteLine($"Зашифрований пароль: {encrypted}"); 15 | 16 | string decrypted = Decrypt(encrypted); 17 | Console.WriteLine($"Розшифрований пароль: {decrypted}"); 18 | } 19 | 20 | static string Encrypt(string text) 21 | { 22 | byte[] data = Encoding.UTF8.GetBytes(text); 23 | using (Aes aes = Aes.Create()) 24 | { 25 | aes.Key = Encoding.UTF8.GetBytes("1234567890123456"); // 16 bytes key 26 | aes.IV = new byte[16]; 27 | ICryptoTransform encryptor = aes.CreateEncryptor(aes.Key, aes.IV); 28 | byte[] encrypted = encryptor.TransformFinalBlock(data, 0, data.Length); 29 | return Convert.ToBase64String(encrypted); 30 | } 31 | } 32 | 33 | static string Decrypt(string encryptedText) 34 | { 35 | byte[] data = Convert.FromBase64String(encryptedText); 36 | using (Aes aes = Aes.Create()) 37 | { 38 | aes.Key = Encoding.UTF8.GetBytes("1234567890123456"); 39 | aes.IV = new byte[16]; 40 | ICryptoTransform decryptor = aes.CreateDecryptor(aes.Key, aes.IV); 41 | byte[] decrypted = decryptor.TransformFinalBlock(data, 0, data.Length); 42 | return Encoding.UTF8.GetString(decrypted); 43 | } 44 | } 45 | } --------------------------------------------------------------------------------