An acetone wash is probably easiest. Cocaine HCl is very poorly soluble. All you need is a funnel, coffee filters, acetone, a beaker or similar container that won't dissolve in acetone and your cocaine. Put your coce in your container and add your acetone. Stir and let dissolve any junk for ~10min. Then just filter it with your funnel and coffee filters. Use more acetone to give it a rinse on the filter. Then just let the remaining acetone evaporate off. This may not purify it to 99%, but will remove some of the junk. This method will not remove boric acid or lidocaine among other things.
If you want it super pure you will have to freebase it. This will remove a majority of any impurity. To do this, completely dissolve your coce in water. Dissolve your base of choice in water and add it to your coce solution. Filter the precipitate. To turn in back into the salt add your freebase coce to a very weak HCl solution. Start very small with the amount of HCl. Keeping adding small amounts of HCl and stirring until it all dissolves. Be patient and don't add too much HCl. Then just let the water evaporate off. This method still won't remove lidocaine, but will certainly be way better. Some cocaine samples don't even have lidocaine so it might no be a problem.