How do I translate this C# encrypt function into Java?
===

I need to translate the below C# codes into Java, however, I could not find any Java equivalent to the Rfc2898DerivedBytes and Rijndael of C#.

        private static string Encrypt(string sData, string sEncryptionKey)
    {
        string str = null;
        string str2;
        try
        {
            Rfc2898DeriveBytes bytes = new Rfc2898DeriveBytes(sEncryptionKey, 8);
            Rijndael rijndael = Rijndael.Create();
            rijndael.IV = bytes.GetBytes(rijndael.BlockSize / 8);
            rijndael.Key = bytes.GetBytes(rijndael.KeySize / 8);
            byte[] buffer = Encoding.Unicode.GetBytes(sData);
            using (MemoryStream stream = new MemoryStream())
            {
                using (CryptoStream stream2 = new CryptoStream(stream, rijndael.CreateEncryptor(), CryptoStreamMode.Write))
                {
                    stream.Write(bytes.Salt, 0, bytes.Salt.Length);
                    stream2.Write(buffer, 0, buffer.Length);
                    stream2.Close();
                    str = Convert.ToBase64String(stream.ToArray());
                    str2 = str;
                }
            }
        }
        catch (Exception exception)
        {
           System.out.println(exception.getMessage());
        }
        return str2;

    }
