Commit 06043b43 authored by Gabriel Moreau's avatar Gabriel Moreau
Browse files

Change to dos format

parent 7074b73a
$KeyFile = Read-Host -Prompt "Key File"
$Password = Read-Host -AsSecureString -Prompt "Password to secure"
$Key = New-Object Byte[] 32 # create key AES 256-bit key (32 bytes)
[Security.Cryptography.RNGCryptoServiceProvider]::Create().GetBytes($Key)
$Key | Out-File $KeyFile
$EncryptedPass = ConvertFrom-SecureString -SecureString $Password -key $Key
Write-Output ""
Write-Output "`$Global:SWMB_Custom{'KesSecureString'} = '$EncryptedPass'"
Write-Output "`$Global:SWMB_Custom{'KesKeyFile'} = '$KeyFile'"
Write-Output ""
$KeyFile = Read-Host -Prompt "Key File"
$Password = Read-Host -AsSecureString -Prompt "Password to secure"
$Key = New-Object Byte[] 32 # create key AES 256-bit key (32 bytes)
[Security.Cryptography.RNGCryptoServiceProvider]::Create().GetBytes($Key)
$Key | Out-File $KeyFile
$EncryptedPass = ConvertFrom-SecureString -SecureString $Password -key $Key
Write-Output ""
Write-Output "`$Global:SWMB_Custom{'KesSecureString'} = '$EncryptedPass'"
Write-Output "`$Global:SWMB_Custom{'KesKeyFile'} = '$KeyFile'"
Write-Output ""
$KeyFile = Read-Host -Prompt "Key File"
$BlurPassword = Read-Host -Prompt "Blur Password"
$Password = $BlurPassword | ConvertTo-SecureString -Key (Get-Content $KeyFile)
$Credential = New-Object System.Management.Automation.PsCredential('AsYouWant',$Password)
$PlainPassword = $Credential.GetNetworkCredential().Password
Write-Output $PlainPassword
$KeyFile = Read-Host -Prompt "Key File"
$BlurPassword = Read-Host -Prompt "Blur Password"
$Password = $BlurPassword | ConvertTo-SecureString -Key (Get-Content $KeyFile)
$Credential = New-Object System.Management.Automation.PsCredential('AsYouWant',$Password)
$PlainPassword = $Credential.GetNetworkCredential().Password
Write-Output $PlainPassword
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment