File indexing completed on 2026-08-06 09:38:12
0001 #ifndef crypto_xof_shake128_H
0002 #define crypto_xof_shake128_H
0003
0004 #include <stddef.h>
0005
0006 #include "export.h"
0007
0008 #ifdef __cplusplus
0009 # ifdef __GNUC__
0010 # pragma GCC diagnostic ignored "-Wlong-long"
0011 # endif
0012 extern "C" {
0013 #endif
0014
0015 #define crypto_xof_shake128_BLOCKBYTES 168U
0016 SODIUM_EXPORT
0017 size_t crypto_xof_shake128_blockbytes(void);
0018
0019 #define crypto_xof_shake128_STATEBYTES 256U
0020 SODIUM_EXPORT
0021 size_t crypto_xof_shake128_statebytes(void);
0022
0023 #define crypto_xof_shake128_DOMAIN_STANDARD 0x1FU
0024 SODIUM_EXPORT
0025 unsigned char crypto_xof_shake128_domain_standard(void);
0026
0027 typedef struct CRYPTO_ALIGN(16) crypto_xof_shake128_state {
0028 unsigned char opaque[256];
0029 } crypto_xof_shake128_state;
0030
0031 SODIUM_EXPORT
0032 int crypto_xof_shake128(unsigned char *out, size_t outlen, const unsigned char *in,
0033 unsigned long long inlen) __attribute__((nonnull(1)));
0034
0035 SODIUM_EXPORT
0036 int crypto_xof_shake128_init(crypto_xof_shake128_state *state) __attribute__((nonnull));
0037
0038 SODIUM_EXPORT
0039 int crypto_xof_shake128_init_with_domain(crypto_xof_shake128_state *state, unsigned char domain)
0040 __attribute__((nonnull));
0041
0042 SODIUM_EXPORT
0043 int crypto_xof_shake128_update(crypto_xof_shake128_state *state,
0044 const unsigned char *in,
0045 unsigned long long inlen) __attribute__((nonnull(1)));
0046
0047 SODIUM_EXPORT
0048 int crypto_xof_shake128_squeeze(crypto_xof_shake128_state *state, unsigned char *out, size_t outlen)
0049 __attribute__((nonnull));
0050
0051 #ifdef __cplusplus
0052 }
0053 #endif
0054
0055 #endif