fix -p, so we don't need to supply a pattern
[shallot.git] / src / math.h
blob6ad4af6615bd684f550a2a256de1292e621309cf
1 #ifndef MATH_H
2 #define MATH_H
4 #include "config.h"
6 // check config - include in first file including config
7 #ifdef BSD
8 #ifdef LINUX_PORT
9 #error BSD and LINUX_PORT defined.
10 #endif
11 #ifdef GENERIC
12 #error BSD and GENERIC defined.
13 #endif
14 #elif defined(LINUX_PORT)
15 #ifdef GENERIC
16 #error LINUX_PORT and GENERIC defined.
17 #endif
18 #elif !defined(GENERIC)
19 #error Nothing defined. Please run ./configure
20 #endif
22 #include <stdint.h>
23 #include <openssl/bn.h>
24 #include <openssl/rsa.h>
25 #include <openssl/sha.h>
27 void int_pow(uint32_t base, uint8_t pwr, uint64_t *out);
28 uint8_t BN_lcm(BIGNUM *r, BIGNUM *a, BIGNUM *b, BIGNUM *gcd, BN_CTX *ctx);
29 RSA *easygen(uint16_t num, uint8_t len, uint8_t *der, uint8_t edl,
30 SHA_CTX *ctx);
31 uint8_t sane_key(RSA *rsa);
33 #endif