$ pwsh <filename.ps1> "this is my string I want to hash"
-
param ( [string]$target = $(Read-Host) ) $stringAsStream = [System.IO.MemoryStream]::new() $writer = [System.IO.StreamWriter]::new($stringAsStream) $writer.write($target) $writer.Flush() $stringAsStream.Position = 0 $outHash = Get-FileHash -InputStream $stringAsStream | Select-Object Hash $ou
$ pwsh "this is my string I want to hash"
tHash.hash.ToLower()
-
param ( [string]$target = $(Read-Host) ) $stringAsStream = [System.IO.MemoryStream]::new() $writer = [System.IO.StreamWriter]::new($stringAsStream) $writer.write($target) $writer.Flush() $stringAsStream.Position = 0 $outHash = Get-FileHash -InputStream $stringAsStream | Select-Object Hash $ou
$ pwsh "this is my string I want to hash"
tHash.hash.ToLower()
And? If this is a programming question, then raise it in the right place - as it says at the top of the page this forum is not for questions. Post it here instead: Ask a Question[^] But ... tell us what it does that you didn't expect, or doesn't do that you did. Tell us what you have tried to get it to work, and what happened when you tried it. Tell us what help you need! If it isn't, then what the heck is it? Random code dumps really aren't popular here either!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!
-
And? If this is a programming question, then raise it in the right place - as it says at the top of the page this forum is not for questions. Post it here instead: Ask a Question[^] But ... tell us what it does that you didn't expect, or doesn't do that you did. Tell us what you have tried to get it to work, and what happened when you tried it. Tell us what help you need! If it isn't, then what the heck is it? Random code dumps really aren't popular here either!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!
-
And? If this is a programming question, then raise it in the right place - as it says at the top of the page this forum is not for questions. Post it here instead: Ask a Question[^] But ... tell us what it does that you didn't expect, or doesn't do that you did. Tell us what you have tried to get it to work, and what happened when you tried it. Tell us what help you need! If it isn't, then what the heck is it? Random code dumps really aren't popular here either!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!
He copied the code from raddevus' post a bit further down, from here[^].
Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles. Dave Kreskowiak