That wouldn't be hard to do.
But I'd worry about the security issues that such a routing involves.
You'd have to restrain the functions that can be run by the routing
library to avoid being cracked. That's not really hard either, but can
be a liability if not done properly.
Guillaume