PowerShellでRSA秘密鍵・公開鍵を作成する
Published:
By nobCategory: Posts
Tags: PowerShell RSA
前提
software | version |
---|---|
PowerShell | 7.5.3 |
手順
秘密鍵の生成
$rsa = [System.Security.Cryptography.RSA]::Create(4096)
秘密鍵のエクスポート(PKCS8形式、パスフレーズなし)
$privateKeyPem = $rsa.ExportPkcs8PrivateKeyPem()
$privateKeyPem | Out-File -FilePath rsa-private-key.pem …