📄 rv3desencryption.h
字号:
/************************************************************************
File Name : rv3desencryption.h
Description :
*************************************************************************
Copyright (c) 2001 , RADVision, Inc. All rights reserved.
*************************************************************************
NOTICE:
This document contains information that is proprietary to RADVision Inc.
No part of this publication may be reproduced in any form whatsoever
without written prior approval by RADVision Inc.
RADVision Inc. reserves the right to revise this publication and make
changes without obligation to notify any person of such revisions or
changes.
*************************************************************************
$Revision: $
$Date: 05/18/2001 $
$Author: Scott K. Eaton $
************************************************************************/
#if !defined(RV3DESENCRYPTION_H)
#define RV3DESENCRYPTION_H
#include "rvdesencryption.h"
#include "rvtypes.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Encryption direction */
#define RV_3DESENCRYPTION_DIRECTION_ENCRYPT RV_DESENCRYPTION_DIRECTION_ENCRYPT /* Encrypt buffer */
#define RV_3DESENCRYPTION_DIRECTION_DECRYPT RV_DESENCRYPTION_DIRECTION_DECRYPT /* Decrypt buffer */
/*$
{type scope="private":
{name: Rv3DesEncryption}
{superpackage: Security}
{include: rv3desencryption.h}
{description:
{p: This class implements the Triple DES encryption algorithm in
outer CBC mode. Only buffers that are multiples of the block
size (64-bits) are allowed.}
}
{attributes scope="private":
{attribute: {t: RvDesEncryption } {n: pass1 } {d: This encryptor performs the first pass.}}
{attribute: {t: RvDesEncryption } {n: pass2 } {d: This encryptor performs the second pass.}}
{attribute: {t: RvDesEncryption } {n: pass3 } {d: This encryptor performs the third pass.}}
}
{methods:
{method: Rv3DesEncryption* rv3DesEncryptionConstruct(Rv3DesEncryption* thisPtr);}
{method: void rv3DesEncryptionDestruct(Rv3DesEncryption* thisPtr);}
{method: void rv3DesEncryptionInitialize(Rv3DesEncryption* thisPtr, RvUint8 direction, const RvUint8 key[21], const RvUint8 iv[8]);}
{method: void rv3DesEncryptionProcess(Rv3DesEncryption* thisPtr, const RvUint8* input, RvUint8* output, RvUint32 length);}
{method: void rv3DesEncryptionReset(Rv3DesEncryption* thisPtr);}
}
}
$*/
typedef struct
{
RvBool encrypt; /* rvTrue, if encrypting data, otherwise decrypting data */
RvUint8 iv[8]; /* Initialization Vector */
RvUint8 prevBlock[8]; /* Previously processed block */
RvDesEncryption pass1;
RvDesEncryption pass2;
RvDesEncryption pass3;
} Rv3DesEncryption;
/* Methods */
Rv3DesEncryption *rv3DesEncryptionConstruct(Rv3DesEncryption *thisPtr);
void rv3DesEncryptionDestruct(Rv3DesEncryption *thisPtr);
void rv3DesEncryptionInitialize(Rv3DesEncryption *thisPtr, RvUint8 direction, const RvUint8 key[21], const RvUint8 iv[8]);
void rv3DesEncryptionProcess(Rv3DesEncryption *thisPtr, const RvUint8 *input, RvUint8 *output, RvUint32 length);
void rv3DesEncryptionReset(Rv3DesEncryption *thisPtr);
#ifdef __cplusplus
}
#endif
#endif /* Include guard */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -