extended the API to support binary keys (not only null-terminated strings)