title: What is the corresponding Powershell module for the PHP encryption library using MCRYPT_RIJNDAEL_256?
body: <p>PHP code: </p>
  
  <p><code>mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, $to_encrypt, MCRYPT_MODE_ECB);</code></p>
  
  <p>I need the corresponding powershell code which can produce the same result.</p>
  
  <p>I have already tried ConvertTo-SecureString/ ConvertFrom-SecureString.</p>
  
  <p>Powershell Code (Not producing correct encryption): </p>
  
  <pre><code>$api_code = "214e3854a1ec5433ae986d1e5d40c436"
  $params = @{"controller" = $controller; "action"= $action;  "all"= $TRUE; }
  [Byte[]] $key = $api_code[0..$api_code.length]
  $param_object = $params | ConvertTo-SecureString -AsPlainText -Force
  $param_aes = $param_object | ConvertFrom-SecureString -key $key
  </code></pre>
  
  <p>The encrypted string is coming out different. Is there a parameter that I am missing? Or Is there another module?</p>