'I'm trying to encrypt my data on a password management software

For example , this is my add user code , i want encrypt those data with the aes 256 algorithm , I want to encrypt the data that I want to store in my database , I'm using an insert command , i want the data to be crypted when it's stored on the database , i want to be able to recover those data thus decrypt them , i believe i will need a user provided key to do so , i want the data to be decrypted only from the client side, i hope it's clear, I tried the documentation but i find it hard to understand as i'm still a begginer in c# , please be very specific with your answers, i need details and code. thank you

String firstname = textBox1.Text;

String fullname = firstname + " " + textBox2.Text;
string  hh = Convert.ToString(DateTime.Now.Ticks.ToString().Substring(15));
string AccessKey = "";
while (AccessKey.Length != 3 || AccessKey.Substring(0, 1) == "0")
    AccessKey = Convert.ToString(DateTime.Now.Ticks.ToString().Substring(15));

username = firstname +" "+ AccessKey;
        
String password = textBox3.Text;

String today = DateTime.Today.ToString("dd-MM-yyyy");

string oradb = "Data Source=CBSUAT;User Id=ramadan;Password=Raam20##;";
OracleConnection conn = new OracleConnection(oradb);  // C#
conn.Open();
OracleCommand cmd = new OracleCommand();
cmd.Connection = conn;
cmd.CommandText = "insert into USER_MASTER (userid, fullname, username, password ) values (master_seq.nextval, '" + fullname + "' , '" + username + "', '" + password + "') ";
cmd.CommandType = CommandType.Text;
cmd.ExecuteNonQuery();
MessageBox.Show("Your User Account has been create successfully , your username is : " + username + "");

conn.Dispose();


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source