Squashed backup commit (no shallow-clone history issues) of xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2 branch, upstream commit 9eece662e) plus all fixes applied to get everpal_defconfig building clean against a modern (GCC 15.2.0) toolchain -- see the previous commit message on the lineage-23.2 branch (also in this repo history is not available here since this is a squashed snapshot; full incremental history lives in the local DL380 checkout and the upstream GitHub remote). Upstream: https://github.com/xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2)
26 lines
537 B
C
26 lines
537 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
#include <openssl/evp.h>
|
|
#include <openssl/sha.h>
|
|
#include <openssl/md5.h>
|
|
|
|
int main(void)
|
|
{
|
|
EVP_MD_CTX *mdctx;
|
|
unsigned char md[MD5_DIGEST_LENGTH + SHA_DIGEST_LENGTH];
|
|
unsigned char dat[] = "12345";
|
|
unsigned int digest_len;
|
|
|
|
mdctx = EVP_MD_CTX_new();
|
|
if (!mdctx)
|
|
return 0;
|
|
|
|
EVP_DigestInit_ex(mdctx, EVP_md5(), NULL);
|
|
EVP_DigestUpdate(mdctx, &dat[0], sizeof(dat));
|
|
EVP_DigestFinal_ex(mdctx, &md[0], &digest_len);
|
|
EVP_MD_CTX_free(mdctx);
|
|
|
|
SHA1(&dat[0], sizeof(dat), &md[0]);
|
|
|
|
return 0;
|
|
}
|