FIND YOUR NEXT FEW LINES

Results for “hash”

Small, practical examples. Search by task or narrow things down below.

28 snippets foundClear filters
PowerShellHashtables & object records

Check for a hashtable key before reading it

PowerShell: ContainsKey distinguishes a missing key from a key whose value happens to be null.

PowerShell✓ Tested
PowerShellHashtables & object records

Convert an object’s properties into a hashtable

PowerShell: Enumerate PSObject.Properties when the set of property names is known only at runtime.

PowerShell✓ Tested
PowerShellHashtables & object records

Enumerate hashtable entries in a stable order

PowerShell: Sort entries by key when predictable output matters.

PowerShell✓ Tested
PythonFile operations & archives

Hash a file without reading it all at once

Python: Feed fixed-size binary chunks into SHA-256 for files larger than memory.

Python✓ Tested
C#JSON & binary formats

Hash a UTF-8 value with SHA-256

C#: Use SHA256.HashData for a one-shot content digest.

C#✓ Tested
PowerShellFunctions & control

Pass named parameters from a hashtable

Keep a command’s options together in a reusable object.

splatting✓ Tested
PowerShellGetting Started

Read a value from a hashtable

PowerShell: Read a value from a hashtable using PowerShell 7.

PowerShell✓ Tested
PowerShellStructured formats & encodings

Read JSON into a hashtable

PowerShell: AsHashtable produces dictionary-style results for keys that are data rather than fixed property names.

PowerShell✓ Tested
GitStashing selected work

Read stash labels without commit hashes

Git: A custom format provides predictable stash subjects.

Git✓ Tested
PowerShellHashtables & object records

Remove an optional hashtable entry

PowerShell: Remove changes the map in place without changing unrelated entries.

PowerShell✓ Tested
PowerShellText & data

Serialize a hashtable as JSON

Produce compact JSON for a small data object.

JSON✓ Tested
PowerShellHashtables & object records

Use a fallback for a missing hashtable entry

PowerShell: Test the key explicitly so legitimate false or zero values are preserved.

PowerShell✓ Tested