Back to home page

EIC code displayed by LXR

 
 

    


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

0001 #ifndef crypto_hash_sha3_H
0002 #define crypto_hash_sha3_H
0003 
0004 #include <stddef.h>
0005 #include <stdint.h>
0006 
0007 #include "export.h"
0008 
0009 #ifdef __cplusplus
0010 # ifdef __GNUC__
0011 #  pragma GCC diagnostic ignored "-Wlong-long"
0012 # endif
0013 extern "C" {
0014 #endif
0015 
0016 typedef struct CRYPTO_ALIGN(16) crypto_hash_sha3256_state {
0017     unsigned char opaque[256];
0018 } crypto_hash_sha3256_state;
0019 
0020 SODIUM_EXPORT
0021 size_t crypto_hash_sha3256_statebytes(void);
0022 
0023 #define crypto_hash_sha3256_BYTES 32U
0024 SODIUM_EXPORT
0025 size_t crypto_hash_sha3256_bytes(void);
0026 
0027 SODIUM_EXPORT
0028 int crypto_hash_sha3256(unsigned char *out, const unsigned char *in,
0029                         unsigned long long inlen) __attribute__ ((nonnull(1)));
0030 
0031 SODIUM_EXPORT
0032 int crypto_hash_sha3256_init(crypto_hash_sha3256_state *state)
0033             __attribute__ ((nonnull));
0034 
0035 SODIUM_EXPORT
0036 int crypto_hash_sha3256_update(crypto_hash_sha3256_state *state,
0037                                const unsigned char *in,
0038                                unsigned long long inlen)
0039             __attribute__ ((nonnull(1)));
0040 
0041 SODIUM_EXPORT
0042 int crypto_hash_sha3256_final(crypto_hash_sha3256_state *state,
0043                               unsigned char *out)
0044             __attribute__ ((nonnull));
0045 
0046 typedef struct CRYPTO_ALIGN(16) crypto_hash_sha3512_state {
0047     unsigned char opaque[256];
0048 } crypto_hash_sha3512_state;
0049 
0050 SODIUM_EXPORT
0051 size_t crypto_hash_sha3512_statebytes(void);
0052 
0053 #define crypto_hash_sha3512_BYTES 64U
0054 SODIUM_EXPORT
0055 size_t crypto_hash_sha3512_bytes(void);
0056 
0057 SODIUM_EXPORT
0058 int crypto_hash_sha3512(unsigned char *out, const unsigned char *in,
0059                         unsigned long long inlen) __attribute__ ((nonnull(1)));
0060 
0061 SODIUM_EXPORT
0062 int crypto_hash_sha3512_init(crypto_hash_sha3512_state *state)
0063             __attribute__ ((nonnull));
0064 
0065 SODIUM_EXPORT
0066 int crypto_hash_sha3512_update(crypto_hash_sha3512_state *state,
0067                                const unsigned char *in,
0068                                unsigned long long inlen)
0069             __attribute__ ((nonnull(1)));
0070 
0071 SODIUM_EXPORT
0072 int crypto_hash_sha3512_final(crypto_hash_sha3512_state *state,
0073                               unsigned char *out)
0074             __attribute__ ((nonnull));
0075 
0076 #ifdef __cplusplus
0077 }
0078 #endif
0079 
0080 #endif