My Project
Loading...
Searching...
No Matches
wolfssl
wolfcrypt
port
devcrypto
wc_devcrypto.h
1
/* wc_devcrypto.h
2
*
3
* Copyright (C) 2006-2020 wolfSSL Inc.
4
*
5
* This file is part of wolfSSL.
6
*
7
* wolfSSL is free software; you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation; either version 2 of the License, or
10
* (at your option) any later version.
11
*
12
* wolfSSL is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
16
*
17
* You should have received a copy of the GNU General Public License
18
* along with this program; if not, write to the Free Software
19
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
20
*/
21
22
23
#ifndef WOLFSSL_DEVCRYPTO_H
24
#define WOLFSSL_DEVCRYPTO_H
25
26
#include <
wolfssl/wolfcrypt/types.h
>
27
28
#ifdef WOLFSSL_DEVCRYPTO
29
30
#include <unistd.h>
31
#include <fcntl.h>
32
#include <sys/ioctl.h>
33
#include <crypto/cryptodev.h>
34
35
typedef
struct
WC_CRYPTODEV
{
36
int
cfd;
37
struct
session_op sess;
38
}
WC_CRYPTODEV
;
39
40
WOLFSSL_LOCAL
int
wc_DevCryptoCreate(
WC_CRYPTODEV
* ctx,
int
type,
byte
* key, word32 keySz);
41
WOLFSSL_LOCAL
void
wc_DevCryptoFree(
WC_CRYPTODEV
* ctx);
42
WOLFSSL_LOCAL
void
wc_SetupCrypt(
struct
crypt_op* crt,
WC_CRYPTODEV
* dev,
43
byte
* src,
int
srcSz,
byte
* dst,
byte
* dig,
int
flag);
44
WOLFSSL_LOCAL
void
wc_SetupCryptSym(
struct
crypt_op* crt,
WC_CRYPTODEV
* dev,
45
byte
* src, word32 srcSz,
byte
* dst,
byte
* iv,
int
flag);
46
WOLFSSL_LOCAL
void
wc_SetupCryptAead(
struct
crypt_auth_op* crt,
WC_CRYPTODEV
* dev,
47
byte
* src, word32 srcSz,
byte
* dst,
byte
* iv, word32 ivSz,
int
flag,
48
byte
* authIn, word32 authInSz,
byte
* authTag, word32 authTagSz);
49
50
#endif
/* WOLFSSL_DEVCRYPTO */
51
#endif
/* WOLFSSL_DEVCRYPTO_H */
52
53
WC_CRYPTODEV
Definition
wc_devcrypto.h:35
types.h