?? crypt_util.c
字號:
// $Header: /I76/I76_Common/I76_Reference/Playcore/Nav_Clips/AviDrm/LibDrmCommon/crypt_util.c 1 20/01/04 12:15 Lotan $
// Copyright (c) 2003 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.
#include "Playcore\Nav_Clips\AviDrm\libDrmCommon\crypt_util.h"
#ifdef AVI_DRM_SUPPORT
int crypt_util_make_key(unsigned char *keydata, int direction, keyInstance *key, int keyLength)
{
int index=0;
char buffer[100];
for(index=0; index < keyLength; index++)
{
sprintf(&buffer[2*index], "%02X", keydata[index]);
}
if(!makeKey(key, direction, keyLength*8, buffer))
{
return -1;
}
return 1;
}
// <<< Robin_0915_2004
#ifndef AVI_DRM_OPTIMIZATION
void crypt_util_encrypt(cipherInstance * cipher, keyInstance *key, unsigned char *clearBuffer, int clearBufferSize, unsigned char *encryptedBuffer, int * encryptedBufferSize )
{
*encryptedBufferSize = blockEncrypt(cipher, key, clearBuffer, clearBufferSize*8, encryptedBuffer);
*encryptedBufferSize = (*encryptedBufferSize)/8;
}
#endif
// >>> Robin_0915_2004
void crypt_util_decrypt(cipherInstance * cipher, keyInstance *key, unsigned char *encryptedBuffer, int encryptedBufferSize, unsigned char *clearBuffer, int * clearBufferSize )
{
*clearBufferSize = blockDecrypt(cipher, key, encryptedBuffer, encryptedBufferSize*8, clearBuffer);
*clearBufferSize = (*clearBufferSize)/8;
}
#endif // AVI_DRM_SUPPORT
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -