X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fed25519%2Ffixedint.h;h=e9f973c87ac195af7835fe3c64446e4e1d552de8;hb=5822f817aa802c2c5a83e9d99a8ae78cb822799b;hp=d03e4bddde3db6e0dd5d367dd37aca280181303b;hpb=2f01744f82be542894fe2ceecbfb9ead93c9ffa5;p=tinc diff --git a/src/ed25519/fixedint.h b/src/ed25519/fixedint.h index d03e4bdd..e9f973c8 100644 --- a/src/ed25519/fixedint.h +++ b/src/ed25519/fixedint.h @@ -1,3 +1,6 @@ +#ifndef TINC_FIXEDINT_H +#define TINC_FIXEDINT_H + /* Portable header to provide the 32 and 64 bits type. @@ -68,3 +71,21 @@ #define INT64_C(v) v ##I64 #endif #endif + +static inline unsigned char shlu8(unsigned char a, uint32_t b) { + return a << b; +} + +static inline int32_t shl32(uint32_t a, uint32_t b) { + return a << b; +} + +static inline int64_t shl64(uint64_t a, uint32_t b) { + return a << b; +} + +static inline uint64_t shlu64(uint64_t a, uint32_t b) { + return a << b; +} + +#endif