How do you plan to use the salt? Technically, if the caller appends it, you will always get non-empty string. A better approach would be for this method to automatically salt it.