6 lines
267 B
PowerShell
6 lines
267 B
PowerShell
$bytes = 24
|
|
|
|
[System.Security.Cryptography.RNGCryptoServiceProvider] $rng = New-Object System.Security.Cryptography.RNGCryptoServiceProvider
|
|
$rndbytes = New-Object byte[] $bytes
|
|
$rng.GetBytes($rndbytes)
|
|
[System.IO.File]::WriteAllBytes("$PWD\test.txt", $rndbytes) |