1 /* $NetBSD: crypto_api.h,v 1.2 2018/04/06 18:59:00 christos Exp $ */ 2 /* $OpenBSD: crypto_api.h,v 1.4 2017/12/14 21:07:39 naddy Exp $ */ 3 4 /* 5 * Assembled from generated headers and source files by Markus Friedl. 6 * Placed in the public domain. 7 */ 8 9 #ifndef crypto_api_h 10 #define crypto_api_h 11 12 #include <stdint.h> 13 #include <stdlib.h> 14 15 typedef int32_t crypto_int32; 16 typedef uint32_t crypto_uint32; 17 18 #define randombytes(buf, buf_len) arc4random_buf((buf), (buf_len)) 19 20 #define crypto_hash_sha512_BYTES 64U 21 22 int crypto_hash_sha512(unsigned char *, const unsigned char *, 23 unsigned long long); 24 25 int crypto_verify_32(const unsigned char *, const unsigned char *); 26 27 #define crypto_sign_ed25519_SECRETKEYBYTES 64U 28 #define crypto_sign_ed25519_PUBLICKEYBYTES 32U 29 #define crypto_sign_ed25519_BYTES 64U 30 31 int crypto_sign_ed25519(unsigned char *, unsigned long long *, 32 const unsigned char *, unsigned long long, const unsigned char *); 33 int crypto_sign_ed25519_open(unsigned char *, unsigned long long *, 34 const unsigned char *, unsigned long long, const unsigned char *); 35 int crypto_sign_ed25519_keypair(unsigned char *, unsigned char *); 36 37 #endif /* crypto_api_h */ 38