Thanks, yes. This would probably get the job done, and make management happy. Taking Abigail's excellent advice, I would ideally have the candidate talk me through the solution, but perhaps simply on a whiteboard. What I'm leaning towards now is something they could think through and type up in 30 minutes or less, followed by a chunk of time in which they could walk me through their solution and explain it.
And although I like to see (and create) test scripts for most non-trivial code, I don't think I'd expect anyone to write one given such a short time to complete the whole task. But 5 or 10 lines of comments (or POD) explaining basic design decisions would be a major plus in my book.