drm_memory.h

来自「SAMSUNG 5009的源代码」· C头文件 代码 · 共 61 行

H
61
字号
/*
// $Header: /Mux_Demux_SDK/libDrmDecrypt/src/DrmMemory.h 6     8/15/03 4:13p Wiley $
// Copyright (c) DivXNetworks, Inc. http://www.divxnetworks.com
// All rights reserved.
//
// This software is the confidential and proprietary information of DivxNetworks
// Inc. ("Confidential Information").  You shall not disclose such Confidential
// Information and shall use it only in accordance with the terms of the license
// agreement you entered into with DivXNetworks, Inc.
*/

/*
These functions and structures allow representation and manipulation
of the memory used by the ADP DRM.
*/

#ifndef DRMMEMORY_H_INCLUDE
#define DRMMEMORY_H_INCLUDE

typedef struct OwnerSlotStruct
{
    UCHAR guard[OWNER_GUARD_BYTES];
    UCHAR key[KEY_SIZE_BYTES];
    UCHAR userId[OWNER_USER_ID_BYTES];
} OwnerSlot;

typedef struct PlaySlotStruct
{
    UCHAR serialNumber[SLOT_SERIAL_NUMBER_BYTES];
    UCHAR counter;
} PlaySlot;

typedef struct DrmMemoryStruct
{
    OwnerSlot owner;
    PlaySlot slots[TOTAL_PLAY_SLOTS];
} DrmMemory;

typedef struct DrmPackedMemoryStruct
{
    UCHAR packed[PACKED_ALLOCATION_BYTES];
} DrmPackedMemory;

#ifdef __cplusplus
extern "C" {
#endif

UCHAR packDrmMemory(DrmMemory memory, DrmPackedMemory *packedMemory);
UCHAR unpackDrmMemory(DrmPackedMemory packedMemory, DrmMemory *memory);
UCHAR packLogic(DrmMemory *memory, DrmPackedMemory *packedMemory, UCHAR direction);

UCHAR randomizeGuard(DrmMemory *memory);

UCHAR loadDrmMemory(DrmMemory *memory);
UCHAR saveDrmMemory(DrmMemory *memory);

#ifdef __cplusplus
};
#endif

#endif //DRMMEMORY_H_INCLUDE

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?