File indexing completed on 2025-01-18 10:02:14
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
0033
0034
0035
0036
0037
0038
0039
0040
0041 #ifndef NETTLE_BALLOON_H_INCLUDED
0042 #define NETTLE_BALLOON_H_INCLUDED
0043
0044 #include "nettle-types.h"
0045
0046 #ifdef __cplusplus
0047 extern "C" {
0048 #endif
0049
0050
0051 #define balloon nettle_balloon
0052 #define balloon_itch nettle_balloon_itch
0053 #define balloon_sha1 nettle_balloon_sha1
0054 #define balloon_sha256 nettle_balloon_sha256
0055 #define balloon_sha384 nettle_balloon_sha384
0056 #define balloon_sha512 nettle_balloon_sha512
0057
0058 void
0059 balloon(void *hash_ctx,
0060 nettle_hash_update_func *update,
0061 nettle_hash_digest_func *digest,
0062 size_t digest_size, size_t s_cost, size_t t_cost,
0063 size_t passwd_length, const uint8_t *passwd,
0064 size_t salt_length, const uint8_t *salt,
0065 uint8_t *scratch, uint8_t *dst);
0066
0067 size_t
0068 balloon_itch(size_t digest_size, size_t s_cost);
0069
0070 void
0071 balloon_sha1(size_t s_cost, size_t t_cost,
0072 size_t passwd_length, const uint8_t *passwd,
0073 size_t salt_length, const uint8_t *salt,
0074 uint8_t *scratch, uint8_t *dst);
0075
0076 void
0077 balloon_sha256(size_t s_cost, size_t t_cost,
0078 size_t passwd_length, const uint8_t *passwd,
0079 size_t salt_length, const uint8_t *salt,
0080 uint8_t *scratch, uint8_t *dst);
0081
0082 void
0083 balloon_sha384(size_t s_cost, size_t t_cost,
0084 size_t passwd_length, const uint8_t *passwd,
0085 size_t salt_length, const uint8_t *salt,
0086 uint8_t *scratch, uint8_t *dst);
0087
0088 void
0089 balloon_sha512(size_t s_cost, size_t t_cost,
0090 size_t passwd_length, const uint8_t *passwd,
0091 size_t salt_length, const uint8_t *salt,
0092 uint8_t *scratch, uint8_t *dst);
0093
0094 #ifdef __cplusplus
0095 }
0096 #endif
0097
0098 #endif