Exposed the encodeLevelKey function.