2022-06-03 19:15:11 +00:00
|
|
|
/* SPDX-License-Identifier: BSD-3-Clause
|
2016-08-02 16:34:45 +00:00
|
|
|
* Copyright (C) 2008-2012 Daisuke Aoyama <aoyama@peach.ne.jp>.
|
2022-11-01 20:26:26 +00:00
|
|
|
* Copyright (C) 2016 Intel Corporation.
|
2016-08-02 16:34:45 +00:00
|
|
|
* All rights reserved.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef SPDK_MD5_H
|
|
|
|
#define SPDK_MD5_H
|
|
|
|
|
2017-05-02 18:18:25 +00:00
|
|
|
#include "spdk/stdinc.h"
|
2016-08-02 16:34:45 +00:00
|
|
|
|
|
|
|
#include <openssl/md5.h>
|
2022-04-09 11:22:59 +00:00
|
|
|
#include <openssl/evp.h>
|
2016-08-02 16:34:45 +00:00
|
|
|
|
|
|
|
#define SPDK_MD5DIGEST_LEN MD5_DIGEST_LENGTH
|
|
|
|
|
|
|
|
struct spdk_md5ctx {
|
2022-04-09 11:22:59 +00:00
|
|
|
EVP_MD_CTX *md5ctx;
|
2016-08-02 16:34:45 +00:00
|
|
|
};
|
|
|
|
|
2020-04-15 22:01:40 +00:00
|
|
|
int md5init(struct spdk_md5ctx *md5ctx);
|
|
|
|
int md5final(void *md5, struct spdk_md5ctx *md5ctx);
|
|
|
|
int md5update(struct spdk_md5ctx *md5ctx, const void *data, size_t len);
|
2016-08-02 16:34:45 +00:00
|
|
|
|
|
|
|
#endif /* SPDK_MD5_H */
|