Powershell的Base64编解码

2014-11-21 0 315
Powershell的Base64编解码
function ConvertTo-Base64($string) {
   $bytes  = [System.Text.Encoding]::UTF8.GetBytes($string);
   $encoded = [System.Convert]::ToBase64String($bytes); 

   return $encoded;
}

function ConvertFrom-Base64($string) {
   $bytes  = [System.Convert]::FromBase64String($string);
   $decoded = [System.Text.Encoding]::UTF8.GetString($bytes); 

   return $decoded;
}

遇见资源网 shell Powershell的Base64编解码 http://www.ox520.com/16749.html

上一篇: nginx qps 监控
下一篇: expect简单示例
常见问题

相关文章

发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务