Search code examples
c#flutterdartencryptionaes

Generating aes cbc key from password and iv in dart


anyone havean idea how can i generate a key for aes encryption in dart from iv and password? like this code written in C#:

 var spec = new Rfc2898DeriveBytes(Encoding.UTF8.GetBytes(PASSWORD), Encoding.UTF8.GetBytes(SALT), 65536);
        byte[] key = spec.GetBytes(16);

Solution

  • Thank you everyone, I generated the key using C# code then I used it as constant in my flutter app, I really appreciate your help.