upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/components/negentropy_lib/compat/openssl/sha.h
blob: b0881c199aa1288e1b94aa1fb3542de2e2d037d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#ifndef OPENSSL_SHA_COMPAT_H
#define OPENSSL_SHA_COMPAT_H

#include "mbedtls/sha256.h"
#include <stddef.h>

#define SHA256_DIGEST_LENGTH 32

static inline int SHA256_compat(const unsigned char *d, size_t n, unsigned char *md)
{
    return mbedtls_sha256(d, n, md, 0);
}

#define SHA256 SHA256_compat

#endif