1261287Sdes/* $OpenBSD: crypto_api.h,v 1.3 2013/12/17 10:36:38 markus Exp $ */ 2261287Sdes 3261287Sdes/* 4261287Sdes * Assembled from generated headers and source files by Markus Friedl. 5261287Sdes * Placed in the public domain. 6261287Sdes */ 7261287Sdes 8261287Sdes#ifndef crypto_api_h 9261287Sdes#define crypto_api_h 10261287Sdes 11261287Sdes#ifdef HAVE_STDINT_H 12261287Sdes# include <stdint.h> 13261287Sdes#endif 14261287Sdes#include <stdlib.h> 15261287Sdes 16261287Sdestypedef int32_t crypto_int32; 17261287Sdestypedef uint32_t crypto_uint32; 18261287Sdes 19261287Sdes#define randombytes(buf, buf_len) arc4random_buf((buf), (buf_len)) 20261287Sdes 21261287Sdes#define crypto_hashblocks_sha512_STATEBYTES 64U 22261287Sdes#define crypto_hashblocks_sha512_BLOCKBYTES 128U 23261287Sdes 24261287Sdesint crypto_hashblocks_sha512(unsigned char *, const unsigned char *, 25261287Sdes unsigned long long); 26261287Sdes 27261287Sdes#define crypto_hash_sha512_BYTES 64U 28261287Sdes 29261287Sdesint crypto_hash_sha512(unsigned char *, const unsigned char *, 30261287Sdes unsigned long long); 31261287Sdes 32261287Sdesint crypto_verify_32(const unsigned char *, const unsigned char *); 33261287Sdes 34261287Sdes#define crypto_sign_ed25519_SECRETKEYBYTES 64U 35261287Sdes#define crypto_sign_ed25519_PUBLICKEYBYTES 32U 36261287Sdes#define crypto_sign_ed25519_BYTES 64U 37261287Sdes 38261287Sdesint crypto_sign_ed25519(unsigned char *, unsigned long long *, 39261287Sdes const unsigned char *, unsigned long long, const unsigned char *); 40261287Sdesint crypto_sign_ed25519_open(unsigned char *, unsigned long long *, 41261287Sdes const unsigned char *, unsigned long long, const unsigned char *); 42261287Sdesint crypto_sign_ed25519_keypair(unsigned char *, unsigned char *); 43261287Sdes 44261287Sdes#endif /* crypto_api_h */ 45