< Back

Out-Hash

Sun Jan 19, 2020 5:54 pm

NAME Out-Hash



SYNOPSIS

Output string hash. Supported hash algorithms: SHA,SHA1,MD5,SHA256,SHA-256,SHA384,SHA-384,SHA512,SHA-512.

Supported encoding: UTF8,ASCII,UTF7,UTF32,BigEndianUnicode.





SYNTAX

Out-Hash [[-in] <String>] [-Algorithm <String>] [-Encoding <String>] [<CommonParameters>]





DESCRIPTION

Output string hash. Supported hash algorithms: SHA,SHA1,MD5,SHA256,SHA-256,SHA384,SHA-384,SHA512,SHA-512.

Supported encoding: UTF8,ASCII,UTF7,UTF32,BigEndianUnicode.





PARAMETERS

-in <String>



Required? false

Position? 1

Default value

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



-Algorithm <String>



Required? false

Position? named

Default value SHA1

Accept pipeline input? false

Accept wildcard characters? false



-Encoding <String>



Required? false

Position? named

Default value UTF8

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>'string1','string2' | Out-Hash -Algorithm SHA256 -Encoding UTF8



Get hash









-------------------------- EXAMPLE 2 --------------------------



PS C:\\>(0..20) | %{"string"+(get-random)} | out-hash



Get hash









-------------------------- EXAMPLE 3 --------------------------



PS C:\\>gc c:\\strings-to-hash.txt | ohash -Algorithm md5



Get hash











RELATED LINKS