Fix a bug in which maxKey maynot be long enough to hold the longest key.
Merge pull request #146 from tonyhuang/salting

Fix a bug in which maxKey maynot be long enough to hold the longest key.