OMADRM2学习笔记:DCF-v2结构解析

【虎.无名】由于需要支持流媒体格式,因而OMA-DRM-DCF-v2采用了基于ISO14496-12的多媒体结构来定义,它与OMA-DRM-DCF-v1完全不兼容。其他如quicktime和3gpp等多媒体文件也是采用了类似的结构定义。我刚实现了一个OMA-DRM-v2的编码解码器,找了一个odf文件解析了一把,以树型结构很清晰地输出了[DCF-v2]的结构。

--- printInfo(test_decode) ---
0 #class   = omadrm2.IsoDcf$OMADRM2Dcf...test_decode
0.1 ftyp#class= omadrm2.Iso14496$FileBrandBox...test_decode-ftyp
0.1 ftyp.size = 20B(h:8B)
0.1 ftyp.Brand1  = odcf
0.1 ftyp.Version = 2
0.1 ftyp.Brand2  = odcf
0.1 odrm#class= omadrm2.IsoDcf$OMADRMContainer...test_decode-0
0.1 odrm.size = 482028B(h:20B)
0.1 odrm.ext4 = ver:0/flag:0x000000
0.1.2 odhe#class= omadrm2.IsoDcf$OMADRMDiscreteHeaders...test_decode-0
0.1.2 odhe.size = 300B(h:12B)
0.1.2 odhe.ext4 = ver:0/flag:0x000001
0.1.2 odhe.ContentTypeLength = 10
0.1.2 odhe.ContentType   = audio/mpeg
0.1.2.3 ohdr#class= omadrm2.IsoDcf$OMADRMCommonHeaders...test_decode-0-ohdr
0.1.2.3 ohdr.size = 186B(h:12B)
0.1.2.3 ohdr.ext4 = ver:0/flag:0x000000
0.1.2.3 ohdr.EncryptionMethod   = 0x01/AES_128_CBC
0.1.2.3 ohdr.PaddingScheme    = 0x01/RFC_2630
0.1.2.3 ohdr.PlaintextLength  = 0x0000000000075977/用途??
0.1.2.3 ohdr.ContentID    = [40] cid:[email protected]
0.1.2.3 ohdr.RightsIssuerURL  = [118] http://portal.beepscience.com/demo/marketingZone/xhtml/ri/[email protected]&zoneid=9021
0.1.2.3 ohdr.TextualHeadersLength = 0
0.1.2.3 ohdr.ExtendedHeaders.n = 0
0.1.2.3 udta#class= omadrm2.Iso14496$UserDataBox...test_decode-0-udta
0.1.2.3 udta.size = 91B(h:8B)
0.1.2.3 udta.UserData = 000000177469746C0000000015C74261627920426F79000000001E637072740000000015C74265796F6E6365204B6E6F776C6573000000001E617574680000000015C74265796F6E6365204B6E6F776C657300
0.1.2.3 udta.UserData =  . . . . t i t l . . . . . . B a b y B o y . . . . . c p r t . . . . . . B e y o n c e K n o w l e s . . . . . a u t h . . . . . . B e y o n c e K n o w l e s .
0.1.2.3.4 titl#class= omadrm2.Iso14496$FullBox...test_decode-0-udta-0
0.1.2.3.4 titl.size = 23B(h:12B)
0.1.2.3.4 titl titl.body = [11] = 15C74261627920426F7900
0.1.2.3.4 titl titl.body = [11] =  . . B a b y B o y .
0.1.2.3.4 titl.ext4 = ver:0/flag:0x000000
0.1.2.3.4 cprt#class= omadrm2.Iso14496$FullBox...test_decode-0-udta-1
0.1.2.3.4 cprt.size = 30B(h:12B)
0.1.2.3.4 cprt cprt.body = [18] = 15C74265796F6E6365204B6E6F776C657300
0.1.2.3.4 cprt cprt.body = [18] =  . . B e y o n c e K n o w l e s .
0.1.2.3.4 cprt.ext4 = ver:0/flag:0x000000
0.1.2.3.4 auth#class= omadrm2.Iso14496$FullBox...test_decode-0-udta-2
0.1.2.3.4 auth.size = 30B(h:12B)
0.1.2.3.4 auth auth.body = [18] = 15C74265796F6E6365204B6E6F776C657300
0.1.2.3.4 auth auth.body = [18] =  . . B e y o n c e K n o w l e s .
0.1.2.3.4 auth.ext4 = ver:0/flag:0x000000
0.1.2 odda#class= omadrm2.IsoDcf$OMADRMContentObject...test_decode-0
0.1.2 odda.size = 481708B(h:20B)
0.1.2 odda.ext4 = ver:0/flag:0x000000
0.1.2 odda.OMADRMDataLength = 481680
0.1.2 odda.OMADRMData   = 52C5F64A6ABAE9DABF3496B9031BC5D87F3795D7D01EE8D34C135A9E38BF935AF52193CBB99E02ADE94BA2F7F87962A85F3F7D22011A2B700CC6735B943D3379571873972EDF2B34137988FD317829C96A33AE00478A21E19A3CC41547BAAAE6502E6A99337F6D950E05CC8BE6C69FE67F08559F930AB43FCF492BA5ACDB9E69A6941BD1C50A82F7ABD40BD621B02B9A56DA306EDF94CC7CD70A03BEED86DE0C6C05232BD604A60C811A096AA3AA31F5567B8D06176D954252015D4DD3E19F91EA4614A490DCF2CF
0.1.2 odda.OMADRMData   =  R . . J j . . . . 4 . . . . . . . 7 . . . . . . L . Z . 8 . . Z . ! . . . . . . . K . . . y b . _ ? } " . . + p . . s [ . = 3 y W . s . . . + 4 . y . . 1 x ) . j 3 . . G . ! . .< . . G . . . P . j . 3 . m . . . . . . . . . . . U . . . . ? . I + . . . . i . . . . . . . . . . . . ! . + . V . 0 n . . . | . . . . . . . . l . # + . . . . . . . j . . 1 . V { . . . m . B R . ] M . . . . . F . . . . . .(加密的内容数据,略)
0.1 odrm.Extensions.n = 0
0.1 mdri#class= omadrm2.IsoDcf$MutableDRMInformation...test_decode-mdri
0.1 mdri.size = 4291B(h:8B)
0.1 mdri.Extensions.n = 2
0.1.2 odtt#class= omadrm2.IsoDcf$OMADRMTransactionTracking...test_decode-mdri-0
0.1.2 odtt.size = 28B(h:12B)
0.1.2 odtt.ext4 = ver:0/flag:0x000000
0.1.2 odtt.TransactionID16 = TID1173919171069(会话标志)
0.1.2 odrb#class= omadrm2.IsoDcf$OMADRMRightsObject...test_decode-mdri-1
0.1.2 odrb.size = 4255B(h:12B)
0.1.2 odrb.ext4 = ver:0/flag:0x000000
0.1.2 odrb.Data[4243] = <roap:protectedRO xmlns:roap = "urn:oma:bac:dldrm:roap-1.0">。。。(权限文件,直接以XML格式显示,而不是WBXML压缩格式)

你可能感兴趣的:(数据结构,C++,c,C#,J#)