Java Card CAP 文件组件分析 09—— Reference Location Component
来源:互联网 发布:如何导入sql数据库 编辑:程序博客网 时间:2024/06/06 11:41
Reference Location组件保存了method组件中索引的偏移。
1
2
3
4
5
6
7
8
reference_location_component {
u1 tag
u2 size
u2 byte_index_count
u1 offsets_to_byte_indices[byte_index_count]
u2 byte2_index_count
u1 offsets_to_byte2_indices[byte2_index_count]
}
以helloworld.cap中的RefLocation.cap为例:
0×09 | 0×00 0×13 | 0×00 0×03 | 0x0E 0×26 0x2B | 0×00 0x0C | 0×05 0x0C 0×06 0×04 0×08 0×05 0×11 0x0C 0×07 0×09 0×06 0×09
- tag: 09 COMPONENT_ReferenceLocation
- size: 0×13 该组件中除去tag和size的3个字节,还有19 bytes的信息。
- byte_index_count: 03 在offsets_to_byte_indices数组中的元素数量
- offsets_to_byte_indices[3]: 0x0E 0×26 0x2B 数组中的值是Method_info的偏移,该偏移位置的值是一个constant_pool[]的下标
- byte2_index_count: 0x0C
- offsets_to_byte2_indices[12]: 0×05 0x0C 0×06 0×04 0×08 0×05 0×11 0x0C 0×07 0×09 0×06 0×09
在卡内installer中对RefLocation.cap的解析:
1
2
3
4
5
6
7
8
9
10
11
12
13
//Parse reference location component
int
iPosr = 0;
#define READU1 readU1(pReferenceLocationComponent,&iPosr)
#define READU2 readU2(pReferenceLocationComponent,&iPosr)
u2 byteIndexCount = READU2;
COUT<setOffsetsToByte2Indices(byte2IndexCount);
for
(
int
ir2=0;ir2offsetsToByte2Indices+ir2) = READU1;
}
newapplet->pRefLoc = pRlc;
#undef READU2
#undef READU1
作者:fish
转自:http://www.dreamingfish123.info/?p=684
转自:http://www.dreamingfish123.info/?p=684
0 0
- Java Card CAP 文件组件分析 09—— Reference Location Component
- Java Card CAP组件分析——Header Component
- Java Card CAP组件分析——Header Component
- Java Card CAP 文件组件分析 01—— Header Component
- Java Card CAP 文件组件分析 02—— Directory Component
- Java Card CAP 文件组件分析 03—— Applet Component
- Java Card CAP 文件组件分析 04—— Import Component
- Java Card CAP 文件组件分析 05—— Constant Pool Component
- Java Card CAP 文件组件分析 10—— Export Component
- Java Card CAP 文件组件分析 12—— Debug Component
- Java Card CAP 文件组件分析 00
- Java Card CAP 文件组件分析
- Java Card CAP文件分析
- Java Card CAP文件分析
- JAVA card 应用开发(四) Java Card CAP 文件组件分析
- JAVA card 应用开发(三) 把APPLET(CAP文件)装载到卡片
- JAVA card 应用开发(三) 把APPLET(CAP文件)装载到卡片
- JAVA card 应用开发(三) 把APPLET(CAP文件)装载到卡片
- 杭电1856More is better(并查集)
- BFS(模板)
- C++:private继承与public继承
- C++ struct与class的区别
- java停止线程 interrupt 和守护线程setDaemon
- Java Card CAP 文件组件分析 09—— Reference Location Component
- ORM框架-VB/C#.Net实体代码生成工具(EntitysCodeGenerate)【ECG】4.6
- ACM-尼姆博弈之John——hdu1907
- [SPOJ FASTFLOW] Fast Maximum Flow [最大流]
- Linux服务器程序性能测试的一些思考
- quick-select
- [置顶] oracle 分库分表(sharding)
- C语言 高精度加法
- VS2010+VMWare8+VisualDDK1.5.6