blob: 783350d51366067205cddef01323ca4b664b21e9 [file] [log] [blame]
Akshay Saraswat1f9c9282013-03-20 21:00:58 +00001/*
2 * Header file for SHA hardware acceleration
3 *
4 * Copyright (c) 2012 Samsung Electronics
5 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02006 * SPDX-License-Identifier: GPL-2.0+
Akshay Saraswat1f9c9282013-03-20 21:00:58 +00007 */
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 */
22void 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 */
35void hw_sha1(const uchar * in_addr, uint buflen,
36 uchar * out_addr, uint chunk_size);
37#endif