How can I WEP-Key To CFDATARef ?
How can I WEP-Key To CFDATARef ?
- Subject: How can I WEP-Key To CFDATARef ?
- From: Halit Özüberk \(ProDyne\) <email@hidden>
- Date: Thu, 12 May 2005 20:58:35 +0200
- Thread-topic: How can I WEP-Key To CFDATARef ?
Title: Nachricht
Please Help
me,
How can I
convert a HEX WEP a CFString to CFData ???
example::
CFStringRef
WepKey = CFSTR("AAFCE8A294"); //as HEX -> AAFCE8A294
void* keys[1];
void* values[1];
UInt8
Buffer[21];
memset(Buffer,0,sizeof(Buffer));
WepKey =
CFStringCreateWithCString(kCFAllocatorDefault, cWepKey,
kCFStringEncodingUTF8);
CFRange range = CFRangeMake(0,
CFStringGetLength(WepKey));
CFIndex usedBufLen =
0;
CFIndex iBytes = CFStringGetBytes( WepKey, range,
kCFStringEncodingASCII, 0 , false,
Buffer, CFStringGetLength(WepKey), &usedBufLen );
CFDataRef
Password = CFDataCreate(kCFAllocatorDefault, Buffer,
iBytes);
keys[0] = (void*)
CFSTR("WEPKEY");;
values[0] = (void*)
Password;
.......
Result:
"WEPKEY"
CFDATA <41414643 45384132
3934>
this is the Rigth
encoded Result:
"WEPKEY" CFDATA <abdacee5 0544abd8
cee1053a abdace96 053babaf>
PLEASEEEEEE HELP
MEEEEEEEEEEEEEE ! ! !
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden