blob: 783350d51366067205cddef01323ca4b664b21e9
1 | /* |
2 | * Header file for SHA hardware acceleration |
3 | * |
4 | * Copyright (c) 2012 Samsung Electronics |
5 | * |
6 | * SPDX-License-Identifier: GPL-2.0+ |
7 | */ |
8 | #ifndef __HW_SHA_H |
9 | #define __HW_SHA_H |
10 | |
11 | |
12 | /** |
13 | * Computes hash value of input pbuf using h/w acceleration |
14 | * |
15 | * @param in_addr A pointer to the input buffer |
16 | * @param bufleni Byte length of input buffer |
17 | * @param out_addr A pointer to the output buffer. When complete |
18 | * 32 bytes are copied to pout[0]...pout[31]. Thus, a user |
19 | * should allocate at least 32 bytes at pOut in advance. |
20 | * @param chunk_size chunk size for sha256 |
21 | */ |
22 | void hw_sha256(const uchar * in_addr, uint buflen, |
23 | uchar * out_addr, uint chunk_size); |
24 | |
25 | /** |
26 | * Computes hash value of input pbuf using h/w acceleration |
27 | * |
28 | * @param in_addr A pointer to the input buffer |
29 | * @param bufleni Byte length of input buffer |
30 | * @param out_addr A pointer to the output buffer. When complete |
31 | * 32 bytes are copied to pout[0]...pout[31]. Thus, a user |
32 | * should allocate at least 32 bytes at pOut in advance. |
33 | * @param chunk_size chunk_size for sha1 |
34 | */ |
35 | void hw_sha1(const uchar * in_addr, uint buflen, |
36 | uchar * out_addr, uint chunk_size); |
37 | #endif |
38 |