如何获取 .pfx 文件的 Base 64 编码形式?
我正在尝试实现 Azure 资源管理器模板之一
"certData": {
"type": "string",
"metadata": {
"description": "Base-64 encoded form of the .pfx file"
}
}
您可以看到证书数据需要该信息。
最佳答案
根据您的描述,我建议您可以尝试使用下面的powershell命令来生成Base-64编码的字符串。
$fileContentBytes = get-content 'D:\brando.pfx' -Encoding Byte
[System.Convert]::ToBase64String($fileContentBytes) | Out-File 'D:\pfx-bytes.txt'
它将 pfx 转换为 txt 文件中的 Base-64 编码字符串。
关于azure - .pfx 文件的 Base-64 编码形式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46959822/