Warning, file /include/nettle/nettle-types.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032 #ifndef NETTLE_TYPES_H
0033 #define NETTLE_TYPES_H
0034
0035
0036 #include <stddef.h>
0037 #include <stdint.h>
0038
0039
0040
0041 #ifdef __GNUC__
0042
0043 #define _NETTLE_ATTRIBUTE_PURE __attribute__((pure))
0044 #ifndef _NETTLE_ATTRIBUTE_DEPRECATED
0045
0046 #define _NETTLE_ATTRIBUTE_DEPRECATED __attribute__((deprecated))
0047 #endif
0048
0049 #else
0050
0051 #define _NETTLE_ATTRIBUTE_PURE
0052 #define _NETTLE_ATTRIBUTE_DEPRECATED
0053
0054 #endif
0055
0056 #ifdef __cplusplus
0057 extern "C" {
0058 #endif
0059
0060
0061 union nettle_block16
0062 {
0063 uint8_t b[16];
0064 unsigned long w[16 / sizeof(unsigned long)] _NETTLE_ATTRIBUTE_DEPRECATED;
0065 uint64_t u64[2];
0066 };
0067
0068 union nettle_block8
0069 {
0070 uint8_t b[8];
0071 uint64_t u64;
0072 };
0073
0074
0075 typedef void nettle_random_func(void *ctx,
0076 size_t length, uint8_t *dst);
0077
0078
0079 typedef void nettle_progress_func(void *ctx, int c);
0080
0081
0082 typedef void *nettle_realloc_func(void *ctx, void *p, size_t length);
0083
0084
0085 typedef void nettle_set_key_func(void *ctx, const uint8_t *key);
0086
0087
0088 typedef void nettle_cipher_func(const void *ctx,
0089 size_t length, uint8_t *dst,
0090 const uint8_t *src);
0091
0092
0093
0094
0095 typedef void nettle_crypt_func(void *ctx,
0096 size_t length, uint8_t *dst,
0097 const uint8_t *src);
0098
0099
0100 typedef void nettle_hash_init_func(void *ctx);
0101 typedef void nettle_hash_update_func(void *ctx,
0102 size_t length,
0103 const uint8_t *src);
0104 typedef void nettle_hash_digest_func(void *ctx,
0105 size_t length, uint8_t *dst);
0106
0107
0108
0109 typedef size_t nettle_armor_length_func(size_t length);
0110 typedef void nettle_armor_init_func(void *ctx);
0111
0112 typedef size_t nettle_armor_encode_update_func(void *ctx,
0113 char *dst,
0114 size_t src_length,
0115 const uint8_t *src);
0116
0117 typedef size_t nettle_armor_encode_final_func(void *ctx, char *dst);
0118
0119 typedef int nettle_armor_decode_update_func(void *ctx,
0120 size_t *dst_length,
0121 uint8_t *dst,
0122 size_t src_length,
0123 const char *src);
0124
0125 typedef int nettle_armor_decode_final_func(void *ctx);
0126
0127 #ifdef __cplusplus
0128 }
0129 #endif
0130
0131 #endif