bytesToHex method changed to public.