https://github.com/thordreier/shacrypt
PowerShell module: Create SHA password hash for use in Linux /etc/shadow file
https://github.com/thordreier/shacrypt
mkpasswd passwd password passwordhash passwordhasher passwordhashing powershell powershell-module sha256-crypt sha512-crypt shadow
Last synced: 4 months ago
JSON representation
PowerShell module: Create SHA password hash for use in Linux /etc/shadow file
- Host: GitHub
- URL: https://github.com/thordreier/shacrypt
- Owner: thordreier
- License: mit
- Created: 2023-08-03T10:43:55.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-05T11:54:47.000Z (almost 2 years ago)
- Last Synced: 2024-04-05T12:42:31.687Z (almost 2 years ago)
- Topics: mkpasswd, passwd, password, passwordhash, passwordhasher, passwordhashing, powershell, powershell-module, sha256-crypt, sha512-crypt, shadow
- Language: PowerShell
- Homepage: https://www.powershellgallery.com/packages/ShaCrypt/
- Size: 266 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ShaCrypt
PowerShell module: Create SHA password hash for use in Linux /etc/shadow file
## Usage
### Examples
```powershell
$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](EXAMPLES.ps1).
### Functions
See [FUNCTIONS.md](FUNCTIONS.md) for documentation of functions in this module.
## Install
### Install module from PowerShell Gallery
```powershell
Install-Module ShaCrypt
```
### Install module from source
```powershell
git clone https://github.com/thordreier/ShaCrypt.git
cd ShaCrypt
git pull
.\Build.ps1 -InstallModule
```