diff options
Diffstat (limited to 'libs/libsodium/src/crypto_pwhash/scryptsalsa208sha256/crypto_scrypt.h')
-rw-r--r-- | libs/libsodium/src/crypto_pwhash/scryptsalsa208sha256/crypto_scrypt.h | 53 |
1 files changed, 22 insertions, 31 deletions
diff --git a/libs/libsodium/src/crypto_pwhash/scryptsalsa208sha256/crypto_scrypt.h b/libs/libsodium/src/crypto_pwhash/scryptsalsa208sha256/crypto_scrypt.h index bc40196f1d..4c094f29a6 100644 --- a/libs/libsodium/src/crypto_pwhash/scryptsalsa208sha256/crypto_scrypt.h +++ b/libs/libsodium/src/crypto_pwhash/scryptsalsa208sha256/crypto_scrypt.h @@ -34,11 +34,7 @@ #include <stddef.h>
#include <stdint.h>
-#if SIZE_MAX > 0xffffffffULL
-#define ARCH_BITS 64
-#else
-#define ARCH_BITS 32
-#endif
+#include "private/quirks.h"
#define crypto_pwhash_scryptsalsa208sha256_STRPREFIXBYTES 14
#define crypto_pwhash_scryptsalsa208sha256_STRSETTINGBYTES 57
@@ -54,45 +50,40 @@ typedef struct { size_t size;
} escrypt_region_t;
-typedef union {
- uint64_t d[8];
- uint32_t w[16];
-} escrypt_block_t;
-
typedef escrypt_region_t escrypt_local_t;
-extern int escrypt_init_local(escrypt_local_t *__local);
+int escrypt_init_local(escrypt_local_t *__local);
-extern int escrypt_free_local(escrypt_local_t *__local);
+int escrypt_free_local(escrypt_local_t *__local);
-extern void *alloc_region(escrypt_region_t *region, size_t size);
-extern int free_region(escrypt_region_t *region);
+void *escrypt_alloc_region(escrypt_region_t *region, size_t size);
+int escrypt_free_region(escrypt_region_t *region);
typedef int (*escrypt_kdf_t)(escrypt_local_t *__local, const uint8_t *__passwd,
size_t __passwdlen, const uint8_t *__salt,
size_t __saltlen, uint64_t __N, uint32_t __r,
uint32_t __p, uint8_t *__buf, size_t __buflen);
-extern int escrypt_kdf_nosse(escrypt_local_t *__local, const uint8_t *__passwd,
- size_t __passwdlen, const uint8_t *__salt,
- size_t __saltlen, uint64_t __N, uint32_t __r,
- uint32_t __p, uint8_t *__buf, size_t __buflen);
+int escrypt_kdf_nosse(escrypt_local_t *__local, const uint8_t *__passwd,
+ size_t __passwdlen, const uint8_t *__salt,
+ size_t __saltlen, uint64_t __N, uint32_t __r,
+ uint32_t __p, uint8_t *__buf, size_t __buflen);
-extern int escrypt_kdf_sse(escrypt_local_t *__local, const uint8_t *__passwd,
- size_t __passwdlen, const uint8_t *__salt,
- size_t __saltlen, uint64_t __N, uint32_t __r,
- uint32_t __p, uint8_t *__buf, size_t __buflen);
+int escrypt_kdf_sse(escrypt_local_t *__local, const uint8_t *__passwd,
+ size_t __passwdlen, const uint8_t *__salt,
+ size_t __saltlen, uint64_t __N, uint32_t __r,
+ uint32_t __p, uint8_t *__buf, size_t __buflen);
-extern uint8_t *escrypt_r(escrypt_local_t *__local, const uint8_t *__passwd,
- size_t __passwdlen, const uint8_t *__setting,
- uint8_t *__buf, size_t __buflen);
+uint8_t *escrypt_r(escrypt_local_t *__local, const uint8_t *__passwd,
+ size_t __passwdlen, const uint8_t *__setting,
+ uint8_t *__buf, size_t __buflen);
-extern uint8_t *escrypt_gensalt_r(uint32_t __N_log2, uint32_t __r, uint32_t __p,
- const uint8_t *__src, size_t __srclen,
- uint8_t *__buf, size_t __buflen);
+uint8_t *escrypt_gensalt_r(uint32_t __N_log2, uint32_t __r, uint32_t __p,
+ const uint8_t *__src, size_t __srclen,
+ uint8_t *__buf, size_t __buflen);
-extern const uint8_t *escrypt_parse_setting(const uint8_t *setting,
- uint32_t *N_log2_p, uint32_t *r_p,
- uint32_t *p_p);
+const uint8_t *escrypt_parse_setting(const uint8_t *setting,
+ uint32_t *N_log2_p, uint32_t *r_p,
+ uint32_t *p_p);
#endif /* !_CRYPTO_SCRYPT_H_ */
|