rvsecutil.h

来自「h.248协议源码」· C头文件 代码 · 共 58 行

H
58
字号
/******************************************************************************
Filename:    rvsecutil.h
Description: security utility functions
*******************************************************************************
                Copyright (c) 2000 RADVision Inc.
*******************************************************************************
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.
******************************************************************************/

#ifndef RV_SECUTIL_H
#define RV_SECUTIL_H

#include <stddef.h>
#include "rvtypes.h"

#ifdef __cplusplus
extern "C" {
#endif

RvUint32 rvSwapEndian(RvUint32 x);

#ifdef RV_ENDIAN_BIG
#define rvToLittleEndian rvSwapEndian
#define rvToBigEndian(x) (x)
#else
#define rvToLittleEndian(x) (x)
#define rvToBigEndian rvSwapEndian
#endif

RvUint32 rvLeftRotate(RvUint32 x, unsigned int n);

typedef RvUint32 (*RvSecAuxFunc)(RvUint32, RvUint32, RvUint32);
RvUint32 rvSecAuxFuncF(RvUint32, RvUint32, RvUint32);
RvUint32 rvSecAuxFuncG(RvUint32, RvUint32, RvUint32);
RvUint32 rvSecAuxFuncH(RvUint32, RvUint32, RvUint32);
RvUint32 rvSecAuxFuncI(RvUint32, RvUint32, RvUint32);
RvUint32 rvSecAuxFuncJ(RvUint32, RvUint32, RvUint32);

size_t rvSecGetPadding(size_t length);

typedef void (*RvSecHashFunc)(const char *, size_t, char *);
typedef void (*RvSecHashWithBufFunc)(char *, size_t, size_t, char *);

void rvHmac(const char *text, size_t textlen, const char *key, size_t keylen,
	char *output, RvSecHashFunc hash, RvSecHashWithBufFunc hashWithBuf, size_t hashlen);

#ifdef __cplusplus
}
#endif

#endif

⌨️ 快捷键说明

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