Skip to contents

Validates hash inputs to ensure they conform to expected formats (MD5, SHA1, SHA256) and contain only valid hexadecimal characters.

Usage

sanitize_hash(hash)

Arguments

hash

Character string representing a file hash

Value

Sanitized hash or throws error if invalid