GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Tabs to spaces · PowerShell/PowerShell@59c9996

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src/Microsoft.PowerShell.Commands.Utility/commands/utility
    • GetHash.cs
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/Microsoft.PowerShell.Commands.Utility/commands/utility/GetHash.cs‎

Copy file name to clipboardExpand all lines: src/Microsoft.PowerShell.Commands.Utility/commands/utility/GetHash.cs
+12-12Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -124,18 +124,18 @@ protected override void ProcessRecord()
124124
{
125125
foreach (string str in InputString)
126126
{
127-
if (str == null)
128-
{
129-
WriteStringHashInfo(Algorithm, string.Empty, string.Empty, Encoding);
130-
Exception exception = new Exception("Hash for 'null' string is 'null'");
131-
WriteError(new ErrorRecord(exception, "GetHashInvalidData", ErrorCategory.InvalidData, null));
132-
}
133-
else
134-
{
135-
byte[] bytehash = hasher.ComputeHash(EncodingConversion.Convert(this, Encoding).GetBytes(str));
136-
string hash = BitConverter.ToString(bytehash).Replace("-","");
137-
WriteStringHashInfo(Algorithm, hash, str, Encoding);
138-
}
127+
if (str == null)
128+
{
129+
WriteStringHashInfo(Algorithm, string.Empty, string.Empty, Encoding);
130+
Exception exception = new Exception("Hash for 'null' string is 'null'");
131+
WriteError(new ErrorRecord(exception, "GetHashInvalidData", ErrorCategory.InvalidData, null));
132+
}
133+
else
134+
{
135+
byte[] bytehash = hasher.ComputeHash(EncodingConversion.Convert(this, Encoding).GetBytes(str));
136+
string hash = BitConverter.ToString(bytehash).Replace("-","");
137+
WriteStringHashInfo(Algorithm, hash, str, Encoding);
138+
}
139139
}
140140
}
141141

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.