modified: pixi.toml
[GalaxyCodeBases.git] / etc / Windows / vlmcsd_old_vancepym / crypto_polarssl.h
blob0474887800ecf24fbb199ef1ef1d5246a4b1e572
1 #ifndef __crypto_polarssl_h
2 #define __crypto_polarssl_h
4 #ifndef CONFIG
5 #define CONFIG "config.h"
6 #endif // CONFIG
7 #include CONFIG
9 #include <polarssl/version.h>
10 #include "crypto.h"
12 #if POLARSSL_VERSION_NUMBER >= 0x01030000
14 #include <polarssl/sha256.h>
16 #define Sha256(d, l, h) sha256(d, l, h, 0)
18 #define Sha256HmacCtx sha256_context
19 #define Sha256HmacInit(c, k, l) ( sha256_hmac_starts(c, k, l, 0), !0 )
20 #define Sha256HmacUpdate(c, d, l) ( sha256_hmac_update(c, d, l), !0 )
21 #define Sha256HmacFinish(c, h) ( sha256_hmac_finish(c, h), !0 )
22 #define Sha256Hmac(k, d, l, h) ( sha256_hmac(k, 16, d, l, h, FALSE), !0 )
24 #else // POLARSSL_VERSION_NUMBER
26 #include <polarssl/sha2.h>
28 #define Sha256(d, l, h) sha2(d, l, h, 0)
30 #define Sha256HmacCtx sha2_context
31 #define Sha256HmacInit(c, k, l) ( sha2_hmac_starts(c, k, l, 0), !0 )
32 #define Sha256HmacUpdate(c, d, l) ( sha2_hmac_update(c, d, l), !0 )
33 #define Sha256HmacFinish(c, h) ( sha2_hmac_finish(c, h), !0 )
34 #define Sha256Hmac(k, d, l, h) ( sha2_hmac(k, 16, d, l, h, FALSE), !0 )
36 #endif // POLARSSL_VERSION_NUMBER
37 #endif // __crypto_polarssl_h