hash/sha2: remove unused headers
This commit is contained in:
parent
c54ac8289b
commit
2a24aa4f70
@ -18,9 +18,7 @@
|
||||
|
||||
#include "lilcrypto.h"
|
||||
#include "hash.h"
|
||||
#include "hash_sha224_sha256.h"
|
||||
#include "impl_sha256.h"
|
||||
|
||||
#include "util.h"
|
||||
|
||||
|
||||
@ -55,7 +53,7 @@
|
||||
#define SHA256_H0_7 UINT32_C(0x5be0cd19)
|
||||
|
||||
|
||||
int
|
||||
static int
|
||||
sha224_init(void *arg)
|
||||
{
|
||||
struct sha256_ctx *ctx = arg;
|
||||
@ -79,7 +77,7 @@ sha224_init(void *arg)
|
||||
return 1;
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
sha256_init(void *arg)
|
||||
{
|
||||
struct sha256_ctx *ctx = arg;
|
||||
@ -143,13 +141,13 @@ sha224_sha256_update(void *arg, const uint8_t *in, size_t inlen)
|
||||
return 1;
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
sha224_update(void *arg, const uint8_t *in, size_t inlen)
|
||||
{
|
||||
return sha224_sha256_update(arg, in, inlen);
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
sha256_update(void *arg, const uint8_t *in, size_t inlen)
|
||||
{
|
||||
return sha224_sha256_update(arg, in, inlen);
|
||||
@ -176,7 +174,7 @@ sha224_sha256_final(struct sha256_ctx *ctx)
|
||||
sha256_block(ctx);
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
sha224_final(void *arg, uint8_t *out, size_t *outlen)
|
||||
{
|
||||
struct sha256_ctx *ctx = arg;
|
||||
@ -199,7 +197,7 @@ sha224_final(void *arg, uint8_t *out, size_t *outlen)
|
||||
return 1;
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
sha256_final(void *arg, uint8_t *out, size_t *outlen)
|
||||
{
|
||||
struct sha256_ctx *ctx = arg;
|
||||
|
@ -1,27 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2024 Lucas Gabriel Vuotto <lucas@lgv5.net>
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
int sha224_init(void *);
|
||||
int sha224_update(void *, const uint8_t *, size_t);
|
||||
int sha224_final(void *, uint8_t *, size_t *);
|
||||
|
||||
int sha256_init(void *);
|
||||
int sha256_update(void *, const uint8_t *, size_t);
|
||||
int sha256_final(void *, uint8_t *, size_t *);
|
@ -18,9 +18,7 @@
|
||||
|
||||
#include "lilcrypto.h"
|
||||
#include "hash.h"
|
||||
#include "hash_sha384_sha512.h"
|
||||
#include "impl_sha512.h"
|
||||
|
||||
#include "util.h"
|
||||
|
||||
|
||||
@ -56,7 +54,7 @@
|
||||
#define SHA512_H0_7 UINT64_C(0x5be0cd19137e2179)
|
||||
|
||||
|
||||
int
|
||||
static int
|
||||
sha384_init(void *arg)
|
||||
{
|
||||
struct sha512_ctx *ctx = arg;
|
||||
@ -80,7 +78,7 @@ sha384_init(void *arg)
|
||||
return 1;
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
sha512_init(void *arg)
|
||||
{
|
||||
struct sha512_ctx *ctx = arg;
|
||||
@ -148,13 +146,13 @@ sha384_sha512_update(void *arg, const uint8_t *in, size_t inlen)
|
||||
return 1;
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
sha384_update(void *arg, const uint8_t *in, size_t inlen)
|
||||
{
|
||||
return sha384_sha512_update(arg, in, inlen);
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
sha512_update(void *arg, const uint8_t *in, size_t inlen)
|
||||
{
|
||||
return sha384_sha512_update(arg, in, inlen);
|
||||
@ -182,7 +180,7 @@ sha384_sha512_final(struct sha512_ctx *ctx)
|
||||
sha512_block(ctx);
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
sha384_final(void *arg, uint8_t *out, size_t *outlen)
|
||||
{
|
||||
struct sha512_ctx *ctx = arg;
|
||||
@ -204,7 +202,7 @@ sha384_final(void *arg, uint8_t *out, size_t *outlen)
|
||||
return 1;
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
sha512_final(void *arg, uint8_t *out, size_t *outlen)
|
||||
{
|
||||
struct sha512_ctx *ctx = arg;
|
||||
|
@ -1,27 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2024 Lucas Gabriel Vuotto <lucas@lgv5.net>
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
int sha384_init(void *);
|
||||
int sha384_update(void *, const uint8_t *, size_t);
|
||||
int sha384_final(void *, uint8_t *, size_t *);
|
||||
|
||||
int sha512_init(void *);
|
||||
int sha512_update(void *, const uint8_t *, size_t);
|
||||
int sha512_final(void *, uint8_t *, size_t *);
|
Loading…
Reference in New Issue
Block a user