-/* $OpenBSD: sha3.c,v 1.6 2023/04/15 18:19:06 jsing Exp $ */
+/* $OpenBSD: sha3.c,v 1.7 2023/04/15 18:29:26 jsing Exp $ */
/*
* The MIT License (MIT)
*
#include "sha3_internal.h"
+#define KECCAKF_ROUNDS 24
+
+#define ROTL64(x, y) (((x) << (y)) | ((x) >> (64 - (y))))
+
static const uint64_t sha3_keccakf_rndc[24] = {
0x0000000000000001, 0x0000000000008082, 0x800000000000808a,
0x8000000080008000, 0x000000000000808b, 0x0000000080000001,
-/* $OpenBSD: sha3_internal.h,v 1.5 2023/04/15 18:22:53 jsing Exp $ */
+/* $OpenBSD: sha3_internal.h,v 1.6 2023/04/15 18:29:26 jsing Exp $ */
/*
* The MIT License (MIT)
*
#ifndef HEADER_SHA3_INTERNAL_H
#define HEADER_SHA3_INTERNAL_H
-#ifndef KECCAKF_ROUNDS
-#define KECCAKF_ROUNDS 24
-#endif
-
-#ifndef ROTL64
-#define ROTL64(x, y) (((x) << (y)) | ((x) >> (64 - (y))))
-#endif
-
typedef struct {
union {
uint8_t b[200]; /* State as 8 bit bytes. */