gpt4 book ai didi

iphone - 在 Objective-C 中从 iDynamo Reader 读取加密数据

转载 作者:塔克拉玛干 更新时间:2023-11-02 21:56:55 24 4
gpt4 key购买 nike

有谁知道有使用 iDynamo Reader 的经验吗? ?此读卡器使用 DES-CBC 加密卡数据。有谁知道如何解密这些数据?

非常感谢您的宝贵时间。

最佳答案

抱歉,如果这太晚了,但可能对其他人有帮助。所以解决方案是联系 Magtek。如果您购买 Magtek 设备,请向他们索取 lib。我从 Magtek 得到了 libDS247.a。然后将 DS247.h 导入您的代码,实现 DS247Delegate。我在这里为您提供一个示例-

(void)deviceDidConnect
{
if (theAlertView.visible)
[theAlertView dismissWithClickedButtonIndex:0 animated:NO];
}

- (void)deviceDidDisconnect
{
theAlertView = [[UIAlertView alloc] initWithTitle:@"Hardware Not Connected!"
message:@"Please connect the device."
delegate:self
cancelButtonTitle:nil otherButtonTitles:nil];
[theAlertView show];
[theAlertView release];
}

- (void)magneticCardReadStart
{
read = YES;
[self.tableView reloadData];
}

- (void)magneticCardReadDidFinish:(NSString *)cardString
{
read = NO;

if (trackMode == 67)
{
NSString *string = [cardString substringWithRange:NSMakeRange(6,20)];
self.pan1 = [[string componentsSeparatedByString:@"^"] objectAtIndex:0];

string = [cardString substringWithRange:NSMakeRange(7+pan1.length,27)];
self.name = [[string componentsSeparatedByString:@"^"] objectAtIndex:0];

string = [cardString substringWithRange:NSMakeRange(8+pan1.length+name.length,4)];
self.ed1 = string;

self.ed2 = @"";
self.pan2 = @"";
}
if (trackMode == 68)
{
NSString *string = [cardString substringWithRange:NSMakeRange(5,20)];
self.pan2 = [[string componentsSeparatedByString:@"="] objectAtIndex:0];

string = [cardString substringWithRange:NSMakeRange(6+pan2.length,4)];
self.ed2 = string;

self.ed1 = @"";
self.name = @"";
self.pan1 = @"";

}
if (trackMode == 69 || trackMode == 70)
{
NSString *string = [cardString substringWithRange:NSMakeRange(7,20)];
self.pan1 = [[string componentsSeparatedByString:@"^"] objectAtIndex:0];

string = [cardString substringWithRange:NSMakeRange(8+pan1.length,27)];
self.name = [[string componentsSeparatedByString:@"^"] objectAtIndex:0];

string = [cardString substringWithRange:NSMakeRange(9+pan1.length+name.length,4)];
self.ed1 = string;

string = [cardString substringWithRange:NSMakeRange(83,20)];
self.pan2 = [[string componentsSeparatedByString:@"="] objectAtIndex:0];

string = [cardString substringWithRange:NSMakeRange(84+pan2.length,4)];
self.ed2 = string;
}
if (trackMode == 71)
{
self.ed1 = @"";
self.ed2 = @"";
self.pan1 = @"";
self.pan2 = @"";
self.name = @"";
}

[self.tableView reloadData];
}

默认设置trackMode为67,cardString为原始卡数据

关于iphone - 在 Objective-C 中从 iDynamo Reader 读取加密数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5977012/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com