ocfcp.h

来自「这是在PCA下的基于IPP库示例代码例子,在网上下了IPP的库之后,设置相关参数」· C头文件 代码 · 共 96 行

H
96
字号
/*////               INTEL CORPORATION PROPRIETARY INFORMATION//  This software is supplied under the terms of a license agreement or//  nondisclosure agreement with Intel Corporation and may not be copied//  or disclosed except in accordance with the terms of that agreement.//        Copyright (c) 2005 Intel Corporation. All Rights Reserved.//*/#if defined( _OCF_ )#if !defined( _OCFPC_H_ )#define _OCFPC_H_#include <sys/types.h>#include <sys/ioctl.h>#include <stdio.h>#include <fcntl.h>#include <unistd.h>#include <crypto/ocf/cryptodev.h>#include "cipherdefs.h"#ifdef  __cplusplusextern "C" {#endif/*// types*/typedef unsigned char u8;typedef unsigned int  u32;typedef struct session_op  OCFSession;typedef struct crypt_op    OCFCryptOp;/* success and error return code */#define OCF_SUCCESS  (0)#define OCF_ERROR    (-1)int ocfCipherID(AlgoName algo);int ocfCipherBlockSizeByID(int id);int ocfCipherOperation(CipherOperation op);/* global descriptor */extern int cdevFD;/*// open (or just return descryptor),// clone// and close Crypto Device*/int  cdevOpen(void);void cdevClose(void);int  cdevClone(void);void cdevCloneClose(int fd);int ocfOccupyCipherSession(int fd, OCFSession* pSess,                           AlgoName algo,                           const u8* pKey, int keyLen);int ocfVacateCipherSession(int fd, OCFSession* pSess);int ocfCipherEnabled(int fd, AlgoName algo);int ocfCipherECB(int fd, OCFSession* pSes, CipherOperation op,                 u8* pDst, const u8* pSrc, int srcLen);int ocfCipherCBC(int fd, OCFSession* pSes, CipherOperation op,                 const u8* pIV,                 u8* pDst, const u8* pSrc, int srcLen);int ocfCipherCFB(int fd, OCFSession* pSes, CipherOperation op,                 const u8* pIV,  int cfbSize,                 u8* pDst, const u8* pSrc, int srcLen);int ocfCipherCTR(int fd, OCFSession* pSes, CipherOperation op,                 u8* pIV, int ctrSize,                 u8* pDst, const u8* pSrc, int srcLen);#ifdef  __cplusplus}#endif#endif /* _OCFPC_H_ */#endif /* _OCF_ */

⌨️ 快捷键说明

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