在PowerShell中加密的Linux字符串中解密

在PowerShell中加密的Linux字符串中解密,linux,windows,powershell,encryption,openssl,Linux,Windows,Powershell,Encryption,Openssl,我有以下PowerShell命令 $a = 'MySecret' $b = 'MySecretKey4Test' $c = ConvertTo-SecureString $a -AsPlainText -Force | ConvertFrom-SecureString -Key ($b.ToCharArray() | % {[byte]$_}) 简单地说,我使用$b作为密钥加密$a。如何在Linux下解密生成的字符串$c,例如使用openssl 我试过这些东西 $b | out-file 'b

我有以下PowerShell命令

$a = 'MySecret'
$b = 'MySecretKey4Test'
$c = ConvertTo-SecureString $a -AsPlainText -Force | ConvertFrom-SecureString -Key ($b.ToCharArray() | % {[byte]$_})
简单地说,我使用$b作为密钥加密$a。如何在Linux下解密生成的字符串$c,例如使用openssl

我试过这些东西

$b | out-file 'b.txt' -enc ascii
$c | out-file 'c.txt' -enc ascii
然后在同一个文件夹中,我尝试了

openssl enc -d -aes128 -in c.txt -kfile b.txt
但它失败的原因是“坏幻数”:(

on.on)。