verify-hash
Function
Verifies that text matches an expected hash (supports SHA-1, SHA-256, SHA-384, SHA-512)
Syntax
$valid = verify-hash $text $expected-hash
verify variable text against variable hash (auto-detects algorithm)
$valid = verify-hash "hello world" $expected-hash
verify literal text against variable hash
$valid = verify-hash $text "b94d27b9..."
verify variable text against literal hash
$valid = verify-hash "hello world" "b94d27b9..."
verify literal text against literal hash