Skip to content

Commit b91b4e7

Browse files
committed
edit spacing
1 parent af30cea commit b91b4e7

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

uniquepass.ps1

+12-12
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ function Hash($textToHash)
44
PowerShell function to generate/retrieve unique local administrator passwords.
55
.DESCRIPTION
66
Takes an MD5 hash of a (optional) unique string, a hardcoded string, and the hostname in which
7-
the function is run on.
7+
the function is run on.
88
.NOTES
99
Author : jakx_
1010
.EXAMPLE
@@ -14,23 +14,23 @@ function Hash($textToHash)
1414
$hostname = hostname
1515

1616
$s = "foobar"
17-
17+
1818
$new = "$hostname" + "$s" + "$texttoHash"
19-
20-
$hashme = new-object System.Security.Cryptography.MD5CryptoServiceProvider
2119

22-
$tohash = [System.Text.Encoding]::UTF8.GetBytes($new)
20+
$hashme = new-object System.Security.Cryptography.MD5CryptoServiceProvider
21+
22+
$tohash = [System.Text.Encoding]::UTF8.GetBytes($new)
2323

24-
$ByteArray = $hashme.ComputeHash($tohash)
24+
$ByteArray = $hashme.ComputeHash($tohash)
2525

26-
foreach($byte in $ByteArray)
26+
foreach($byte in $ByteArray)
2727

28-
{
28+
{
2929

30-
$pass += $byte.ToString()
30+
$pass += $byte.ToString()
3131

32-
}
32+
}
3333

34-
return $pass;
34+
return $pass;
3535

36-
}
36+
}

0 commit comments

Comments
 (0)