Merge pull request #3 from pgonee/master

string containing \x00 raises unexpected exception.
`key_length` must have a default value.
add test case.