You gonna need to extend the NHibernate.Id.TableHiLoGenerator class.
Take a look, this it's the class, the exception thorws because it make a conversion thinking that you string, is a numeric representation.
https://nhibernate.svn.sourceforge.net/svnroot/nhibernate/trunk/nhibernate/src/NHibernate/Id/TableHiLoGenerator.cs
Extend this type a make you own generator.
I'm porting Hibernate Shards, and I need to deal with a similar problem, I need to insert a Id, into a Guid, for example
If I generate this Guid:
3F2504E0-4F89-11D3-9A0C-0305E82C3301
I must convert it to
000D04E0-4F89-11D3-9A0C-0305E82C3301
This mean that the prefix is the number 13 (000D at hex)
This it's the implementation that I propouse:
https://nhibernate.svn.sourceforge.net/svnroot/nhibernate/trunk/nhibernate/src/NHibernate.Shards/src/NHibernate.Shards/Id/ShardedUUIDGenerator.cs
Best regards.