Android Question equivalent to this encryption code

clickir

New Member
hi, what is the equivalent of this encryption code for b4a?

C#:
string encryptKey = "my key"; 

                Rfc2898DeriveBytes pdb = new Rfc2898DeriveBytes(encryptKey, new byte[] { 0x49, 0x76, 0x61, 0x6e, 0x20, 0x4d, 0x65, 0x64, 0x76, 0x65, 0x64, 0x65, 0x76 });
                byte[] key = pdb.GetBytes(32);
                byte[] IV = pdb.GetBytes(16);

                key = Encoding.UTF8.GetBytes(encryptKey);
                byte[] byteInput = Encoding.UTF8.GetBytes(inputString);
                DESCryptoServiceProvider provider = new DESCryptoServiceProvider();
                memStream = new MemoryStream();
                ICryptoTransform transform = provider.CreateEncryptor(key, IV);
                CryptoStream cryptoStream = new CryptoStream(memStream, transform, CryptoStreamMode.Write);
 
Top