Vidya Sagar Velumuri 729085b508 common/cnxk: generate MD5 ipad opad
Add support to generate ipad and opad for MD5.
Skip the call to additional command WRITE_SA during SA creation.
Instead use the software defined function to generate opad and ipad.

Signed-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com>
2022-10-29 13:01:40 +02:00

18 lines
544 B
C

/* SPDX-License-Identifier: BSD-3-Clause
* Copyright (c) 2021 Marvell.
*/
#ifndef _ROC_HASH_H_
#define _ROC_HASH_H_
/*
* Compute a partial hash with the assumption that msg is the first block.
* Based on implementation from RFC 3174
*/
void __roc_api roc_hash_md5_gen(uint8_t *msg, uint32_t *hash);
void __roc_api roc_hash_sha1_gen(uint8_t *msg, uint32_t *hash);
void __roc_api roc_hash_sha256_gen(uint8_t *msg, uint32_t *hash);
void __roc_api roc_hash_sha512_gen(uint8_t *msg, uint64_t *hash, int hash_size);
#endif /* _ROC_HASH_H_ */