title: decrypt in Linux string encrypted in PowerShell
body: <p>I have following PowerShell commands</p>
  
  <pre><code>$a = 'MySecret'
  $b = 'MySecretKey4Test'
  $c = ConvertTo-SecureString $a -AsPlainText -Force | ConvertFrom-SecureString -Key ($b.ToCharArray() | % {[byte]$_})
  </code></pre>
  
  <p>Briefly, I am encrypting $a using $b as key. How can I decrypt resulting string $c under Linux, for example using openssl?</p>
  
  <p>I tried these things</p>
  
  <pre><code>$b | out-file 'b.txt' -enc ascii
  $c | out-file 'c.txt' -enc ascii
  </code></pre>
  
  <p>Then in same folder, I tried</p>
  
  <pre><code>openssl enc -d -aes128 -in c.txt -kfile b.txt
  </code></pre>
  
  <p>But it fails with <em>"bad magic number"</em> :(</p>