Header menu logo TDesu.FSharp

ContentHash Module

Content hashing helpers (SHA256, SHA1, MD5). Netstandard2.1 compatible.

Functions and values

Function or value Description

ContentHash.hashHex alg data

Full Usage: ContentHash.hashHex alg data

Parameters:
Returns: string

Generic: hash bytes to lowercase hex using any HashAlgorithm. The hash algorithm instance to use. The byte array to hash.

alg : HashAlgorithm
data : byte[]
Returns: string

ContentHash.md5Hex s

Full Usage: ContentHash.md5Hex s

Parameters:
    s : string

Returns: string

MD5 hash of a string (UTF-8) as lowercase hex string. The string to hash.

s : string
Returns: string

ContentHash.md5HexBytes data

Full Usage: ContentHash.md5HexBytes data

Parameters:
    data : byte[]

Returns: string

MD5 hash of bytes as lowercase hex string. The byte array to hash.

data : byte[]
Returns: string

ContentHash.sha1 data

Full Usage: ContentHash.sha1 data

Parameters:
    data : byte[]

Returns: byte[]

SHA1 hash of byte array. The byte array to hash.

data : byte[]
Returns: byte[]

ContentHash.sha1Hex data

Full Usage: ContentHash.sha1Hex data

Parameters:
    data : byte[]

Returns: string

SHA1 hash as lowercase hex string. The byte array to hash.

data : byte[]
Returns: string

ContentHash.sha256 data

Full Usage: ContentHash.sha256 data

Parameters:
    data : byte[]

Returns: byte[]

SHA256 hash of byte array. The byte array to hash.

data : byte[]
Returns: byte[]

ContentHash.sha256Hex s

Full Usage: ContentHash.sha256Hex s

Parameters:
    s : string

Returns: string

SHA256 hash as lowercase hex string. The string to hash.

s : string
Returns: string

ContentHash.sha256HexBytes data

Full Usage: ContentHash.sha256HexBytes data

Parameters:
    data : byte[]

Returns: string

SHA256 hash of bytes as lowercase hex string. The byte array to hash.

data : byte[]
Returns: string

ContentHash.sha256String s

Full Usage: ContentHash.sha256String s

Parameters:
    s : string

Returns: byte[]

SHA256 hash of a string (UTF-8). The string to hash.

s : string
Returns: byte[]

Type something to start searching.