filter slash from generate_key function