Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-08-06 09:38:12

0001 #ifndef crypto_xof_turboshake256_H
0002 #define crypto_xof_turboshake256_H
0003 
0004 #include "export.h"
0005 #include <stddef.h>
0006 
0007 #ifdef __cplusplus
0008 extern "C" {
0009 #endif
0010 
0011 #define crypto_xof_turboshake256_BLOCKBYTES 136U
0012 SODIUM_EXPORT
0013 size_t crypto_xof_turboshake256_blockbytes(void);
0014 
0015 #define crypto_xof_turboshake256_STATEBYTES 256U
0016 SODIUM_EXPORT
0017 size_t crypto_xof_turboshake256_statebytes(void);
0018 
0019 #define crypto_xof_turboshake256_DOMAIN_STANDARD 0x1FU
0020 SODIUM_EXPORT
0021 unsigned char crypto_xof_turboshake256_domain_standard(void);
0022 
0023 typedef struct CRYPTO_ALIGN(16) crypto_xof_turboshake256_state {
0024     unsigned char opaque[256];
0025 } crypto_xof_turboshake256_state;
0026 
0027 /* One-shot API */
0028 SODIUM_EXPORT
0029 int crypto_xof_turboshake256(unsigned char *out, size_t outlen, const unsigned char *in,
0030                              unsigned long long inlen) __attribute__((nonnull(1)));
0031 
0032 /* Streaming API with standard domain */
0033 SODIUM_EXPORT
0034 int crypto_xof_turboshake256_init(crypto_xof_turboshake256_state *state) __attribute__((nonnull));
0035 
0036 /* Streaming API with custom domain */
0037 SODIUM_EXPORT
0038 int crypto_xof_turboshake256_init_with_domain(crypto_xof_turboshake256_state *state,
0039                                               unsigned char domain) __attribute__((nonnull));
0040 
0041 SODIUM_EXPORT
0042 int crypto_xof_turboshake256_update(crypto_xof_turboshake256_state *state,
0043                                     const unsigned char            *in,
0044                                     unsigned long long inlen) __attribute__((nonnull(1)));
0045 
0046 SODIUM_EXPORT
0047 int crypto_xof_turboshake256_squeeze(crypto_xof_turboshake256_state *state, unsigned char *out,
0048                                      size_t outlen) __attribute__((nonnull));
0049 
0050 #ifdef __cplusplus
0051 }
0052 #endif
0053 
0054 #endif