xref: /openbsd-src/lib/libcrypto/sha/sha_internal.h (revision 21724f70864fa220179b9ca5bac258bdd2fd0118)
1*21724f70Stb /*	$OpenBSD: sha_internal.h,v 1.3 2023/04/25 15:47:29 tb Exp $ */
28e9acae6Sjsing /*
38e9acae6Sjsing  * Copyright (c) 2023 Joel Sing <jsing@openbsd.org>
48e9acae6Sjsing  *
58e9acae6Sjsing  * Permission to use, copy, modify, and distribute this software for any
68e9acae6Sjsing  * purpose with or without fee is hereby granted, provided that the above
78e9acae6Sjsing  * copyright notice and this permission notice appear in all copies.
88e9acae6Sjsing  *
98e9acae6Sjsing  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
108e9acae6Sjsing  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
118e9acae6Sjsing  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
128e9acae6Sjsing  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
138e9acae6Sjsing  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
148e9acae6Sjsing  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
158e9acae6Sjsing  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
168e9acae6Sjsing  */
178e9acae6Sjsing 
188e9acae6Sjsing #include <openssl/sha.h>
198e9acae6Sjsing 
208e9acae6Sjsing #ifndef HEADER_SHA_INTERNAL_H
218e9acae6Sjsing #define HEADER_SHA_INTERNAL_H
228e9acae6Sjsing 
238e9acae6Sjsing #define SHA512_224_DIGEST_LENGTH	28
248e9acae6Sjsing #define SHA512_256_DIGEST_LENGTH	32
258e9acae6Sjsing 
268e9acae6Sjsing int SHA512_224_Init(SHA512_CTX *c);
278e9acae6Sjsing int SHA512_224_Update(SHA512_CTX *c, const void *data, size_t len)
288e9acae6Sjsing 	__attribute__ ((__bounded__(__buffer__,2,3)));
298e9acae6Sjsing int SHA512_224_Final(unsigned char *md, SHA512_CTX *c);
308e9acae6Sjsing 
318e9acae6Sjsing int SHA512_256_Init(SHA512_CTX *c);
328e9acae6Sjsing int SHA512_256_Update(SHA512_CTX *c, const void *data, size_t len)
338e9acae6Sjsing 	__attribute__ ((__bounded__(__buffer__,2,3)));
348e9acae6Sjsing int SHA512_256_Final(unsigned char *md, SHA512_CTX *c);
358e9acae6Sjsing 
368e9acae6Sjsing #endif
37