Find Jobs
Hire Freelancers

Decode Hex to NSString

$30-250 USD

Completed
Posted about 9 years ago

$30-250 USD

Paid on delivery
Hi Guys, I need your help to decode hex string to nsstring by Objective-c. e.g.) HEX string 03 01 68 74 74 70 3A 2F 2F is http:// in NSString [login to view URL] Thanks
Project ID: 7262780

About the project

8 proposals
Remote project
Active 9 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
A proposal has not yet been provided
$35 USD in 1 day
5.0 (1 review)
0.6
0.6
8 freelancers are bidding on average $86 USD for this job
User Avatar
Hello.. Sorry for my mistake.... My answer was wrong. Here is right answer. - (NSData *)byteArrayFromHexString:(NSString *)hexString { NSData *byteArray = nil; uint8_t *buffer = NULL; NSUInteger i = 0; unichar c = 0; NSUInteger count = 0; int num = 0; BOOL first = YES; NSUInteger length = 0; // Count the number of HEX characters. for (i = 0; i < [hexString length]; i++) { c = [hexString characterAtIndex:i]; if (((c >= '0') && (c <= '9')) || ((c >= 'A') && (c <= 'F')) || ((c >= 'a') && (c <= 'f'))) { count++; } } // Allocate the buffer. buffer = (uint8_t *) malloc((count + 1) / 2); if (buffer != NULL) { for (i = 0; i < [hexString length]; i++) { c = [hexString characterAtIndex:i]; if ((c >= '0') && (c <= '9')) { num = c - '0'; } else if ((c >= 'A') && (c <= 'F')) { num = c - 'A' + 10; } else if ((c >= 'a') && (c <= 'f')) { num = c - 'a' + 10; } else { num = -1; } if (num >= 0) { if (first) { buffer[length] = num << 4; } else { buffer[length] |= num; length++; } first = !first; } } // Create the byte array. byte
$147 USD in 3 days
5.0 (3 reviews)
4.2
4.2
User Avatar
Hi, thanks for your job posted. I am really happy to get an opportunity to apply to this project. I've read your job description so carefully and finally found out this job is very suitable for my skills and speciality. if you hire me I will make a sample app to convert hex to nsstring. Looking forward to your kind answer. Best Regards, Liu
$111 USD in 1 day
5.0 (2 reviews)
3.9
3.9
User Avatar
Hi. I can give you a working objective c code for the simple conversion. Then, you can use the code for whatever purpose you want. Thanks!
$48 USD in 1 day
4.7 (4 reviews)
2.9
2.9
User Avatar
A proposal has not yet been provided
$55 USD in 3 days
5.0 (1 review)
1.5
1.5
User Avatar
I will make you a C program that will convert the hex values to the string. You can rely on me for your requriement
$90 USD in 1 day
0.0 (0 reviews)
0.0
0.0

About the client

Flag of JAPAN
Kawasaki, Japan
5.0
6
Payment method verified
Member since Mar 31, 2011

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.