AILinkSecretTool.framework is a Bluetooth encryption and decryption toolkit developed using ObjectiveC on the iOS platform. The development toolkit can scan and connect to smart devices using AILink Bluetooth module, and is responsible for the handshake between App and Bluetooth module and the encryption and decryption of A7 data. .
@interface ELEncryptTool: NSObject
/**
The app sends this A6 data to actively start a handshake with ble
*/
+(NSData *)handshake;
/**
This method encrypts the A6 data of the ble test app and sends the app to the device, otherwise the device will disconnect the app
*/
+(NSData *)blueToothHandshakeWithData:(NSData *)receiveData;
/**
A7 data encryption/decryption method
*/
+ (NSData *)encryptXOR:(NSData *)macXOR deviceTypeXOR:(NSData *)deviceTypeXOR withXORData:(NSData *)dataXOR;
@end
For specific usage, please refer to AILinkSecretToolDemo
AILinkSecretTool.framework是在iOS平台使用ObjectiveC开发的蓝牙加解密工具包,该开发工具包能够扫描、连接使用AILink蓝牙模组的智能设备,负责App与蓝牙模组之间的握手与A7数据的加解密。
@interface ELEncryptTool : NSObject
/**
app发送此A6数据主动开始与ble进行握手
*/
+(NSData *)handshake;
/**
此方法将ble检验app的A6数据进行加密,app发给设备,否则设备将断开app
*/
+(NSData *)blueToothHandshakeWithData:(NSData *)receiveData;
/**
A7数据加/解密方法
*/
+ (NSData *)encryptXOR:(NSData *)macXOR deviceTypeXOR:(NSData *)deviceTypeXOR withXORData:(NSData *)dataXOR;
@end
具体用法详见AILinkSecretToolDemo