mirror of
https://github.com/Wind4/vlmcsd.git
synced 2025-05-23 03:06:51 -04:00
vlmcsd-svn812-2015-08-30-Hotbird64
This commit is contained in:
commit
1af203d2a8
133 changed files with 102338 additions and 0 deletions
39
crypto_polarssl.h
Normal file
39
crypto_polarssl.h
Normal file
|
@ -0,0 +1,39 @@
|
|||
#ifndef __crypto_polarssl_h
|
||||
#define __crypto_polarssl_h
|
||||
|
||||
#ifndef CONFIG
|
||||
#define CONFIG "config.h"
|
||||
#endif // CONFIG
|
||||
#include CONFIG
|
||||
|
||||
#include <polarssl/version.h>
|
||||
#include "crypto.h"
|
||||
|
||||
#if POLARSSL_VERSION_NUMBER >= 0x01030000
|
||||
|
||||
#include <polarssl/sha256.h>
|
||||
|
||||
#define Sha256(d, l, h) sha256(d, l, h, 0)
|
||||
|
||||
#define Sha256HmacCtx sha256_context
|
||||
#define Sha256HmacInit(c, k, l) ( sha256_hmac_starts(c, k, l, 0), !0 )
|
||||
#define Sha256HmacUpdate(c, d, l) ( sha256_hmac_update(c, d, l), !0 )
|
||||
#define Sha256HmacFinish(c, h) ( sha256_hmac_finish(c, h), !0 )
|
||||
#define Sha256Hmac(k, d, l, h) ( sha256_hmac(k, 16, d, l, h, FALSE), !0 )
|
||||
|
||||
#else // POLARSSL_VERSION_NUMBER
|
||||
|
||||
#include <polarssl/sha2.h>
|
||||
|
||||
#define Sha256(d, l, h) sha2(d, l, h, 0)
|
||||
|
||||
#define Sha256HmacCtx sha2_context
|
||||
#define Sha256HmacInit(c, k, l) ( sha2_hmac_starts(c, k, l, 0), !0 )
|
||||
#define Sha256HmacUpdate(c, d, l) ( sha2_hmac_update(c, d, l), !0 )
|
||||
#define Sha256HmacFinish(c, h) ( sha2_hmac_finish(c, h), !0 )
|
||||
#define Sha256Hmac(k, d, l, h) ( sha2_hmac(k, 16, d, l, h, FALSE), !0 )
|
||||
|
||||
#endif // POLARSSL_VERSION_NUMBER
|
||||
#endif // __crypto_polarssl_h
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue