📜  powershell 中的 base64 解码 - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:51:42.301000             🧑  作者: Mango

代码示例1
---decode
$input = “vikivikivikivikivikivyapvyapvyapvyapvyapnandnandnandnandnandviki”
$output = [System.Text.Encoding]::Unicode.GetString([System.Convert]::FromBase64String($input))
$output

--encode
$input = ‘text to be encoded’
$By = [System.Text.Encoding]::Unicode.GetBytes($input)
$output =[Convert]::ToBase64String($By)
$output