1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (C) 2014 Red Hat Inc.
11 #include <linux/types.h>
12 #include <crypto/sha.h>
15 * Stand-alone implementation of the SHA256 algorithm. It is designed to
16 * have as little dependencies as possible so it can be used in the
17 * kexec_file purgatory. In other cases you should use the implementation in
20 * For details see lib/sha256.c
23 extern int sha256_init(struct sha256_state *sctx);
24 extern int sha256_update(struct sha256_state *sctx, const u8 *input,
26 extern int sha256_final(struct sha256_state *sctx, u8 *hash);