PowerShell module: Create SHA password hash for use in Linux /etc/shadow file
$hash = New-ShaPassword -Password Password1 # Hash can be used in /etc/shadow file on Linux
Test-ShaPassword -Password Password1 -Hash $hash # Returns $true
Test-ShaPassword -Password Password2 -Hash $hash # Returns $false
# Use SHA-256 instead of SHA-512, custom SALT and custom ROUNDS
$hash = New-ShaPassword -Password Password1 -Sha256 -Salt between8n16chars -Rounds 2000
Examples are also found in EXAMPLES.ps1.
See FUNCTIONS.md for documentation of functions in this module.
Install-Module ShaCrypt
git clone https://github.com/thordreier/ShaCrypt.git
cd ShaCrypt
git pull
.\Build.ps1 -InstallModule