Converts a space-separated hex string to Uint8Array. Ignores extra spaces. Returns null if string contains non-hexadecimal characters or is empty.
hexStringToBytes("25 50 44") → Uint8Array([37, 80, 68]) Copy
hexStringToBytes("25 50 44") → Uint8Array([37, 80, 68])
hexStringToBytes("") → null Copy
hexStringToBytes("") → null
Converts a space-separated hex string to Uint8Array. Ignores extra spaces. Returns null if string contains non-hexadecimal characters or is empty.